From 2b988b8ab14ca3ead85a71ada98cfafff148c275 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 11 Feb 2021 22:23:54 +0100 Subject: [PATCH] Handle more gstreamer errors as non-fatal Adds GST_RESOURCE_ERROR_OPEN_READ and GST_STREAM_ERROR_TYPE_NOT_FOUND Fixes #648 --- src/engine/gstengine.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/engine/gstengine.cpp b/src/engine/gstengine.cpp index 19bccefc5..b653bf492 100644 --- a/src/engine/gstengine.cpp +++ b/src/engine/gstengine.cpp @@ -572,7 +572,14 @@ void GstEngine::HandlePipelineError(const int pipeline_id, const QString &messag BufferingFinished(); emit StateChanged(Engine::Error); - if (domain == static_cast(GST_RESOURCE_ERROR) && (error_code == static_cast(GST_RESOURCE_ERROR_NOT_FOUND) || error_code == static_cast(GST_RESOURCE_ERROR_NOT_AUTHORIZED))) { + if ( + (domain == static_cast(GST_RESOURCE_ERROR) && ( + error_code == static_cast(GST_RESOURCE_ERROR_NOT_FOUND) || + error_code == static_cast(GST_RESOURCE_ERROR_OPEN_READ) || + error_code == static_cast(GST_RESOURCE_ERROR_NOT_AUTHORIZED) + )) + || (domain == static_cast(GST_STREAM_ERROR) && error_code == GST_STREAM_ERROR_TYPE_NOT_FOUND) + ) { emit InvalidSongRequested(stream_url_); } else {