1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-18 19:42:53 +01:00

Handle more gstreamer errors as non-fatal

Adds GST_RESOURCE_ERROR_OPEN_READ and GST_STREAM_ERROR_TYPE_NOT_FOUND

Fixes #648
This commit is contained in:
Jonas Kvinge 2021-02-11 22:23:54 +01:00
parent 0abf991b05
commit 2b988b8ab1

View File

@ -572,7 +572,14 @@ void GstEngine::HandlePipelineError(const int pipeline_id, const QString &messag
BufferingFinished();
emit StateChanged(Engine::Error);
if (domain == static_cast<int>(GST_RESOURCE_ERROR) && (error_code == static_cast<int>(GST_RESOURCE_ERROR_NOT_FOUND) || error_code == static_cast<int>(GST_RESOURCE_ERROR_NOT_AUTHORIZED))) {
if (
(domain == static_cast<int>(GST_RESOURCE_ERROR) && (
error_code == static_cast<int>(GST_RESOURCE_ERROR_NOT_FOUND) ||
error_code == static_cast<int>(GST_RESOURCE_ERROR_OPEN_READ) ||
error_code == static_cast<int>(GST_RESOURCE_ERROR_NOT_AUTHORIZED)
))
|| (domain == static_cast<int>(GST_STREAM_ERROR) && error_code == GST_STREAM_ERROR_TYPE_NOT_FOUND)
) {
emit InvalidSongRequested(stream_url_);
}
else {