From e5f312356798629aee778969d1f1774483cfd240 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 27 May 2019 21:39:38 +0200 Subject: [PATCH] Fix gst_pad_send_event block in ErrorMessageReceived() --- src/engine/gstenginepipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/gstenginepipeline.cpp b/src/engine/gstenginepipeline.cpp index 308b1f98c..831e78655 100644 --- a/src/engine/gstenginepipeline.cpp +++ b/src/engine/gstenginepipeline.cpp @@ -583,7 +583,7 @@ void GstEnginePipeline::ErrorMessageReceived(GstMessage *msg) { g_error_free(error); free(debugs); - if (pipeline_is_initialised_ && next_uri_set_ && (domain == GST_RESOURCE_ERROR || domain == GST_STREAM_ERROR)) { + if (state() == GST_STATE_PLAYING && pipeline_is_initialised_ && next_uri_set_ && (domain == GST_RESOURCE_ERROR || domain == GST_STREAM_ERROR)) { // A track is still playing and the next uri is not playable. We ignore the error here so it can play until the end. // But there is no message send to the bus when the current track finishes, we have to add an EOS ourself. qLog(Debug) << "Ignoring error when loading next track";