Fix gst_pad_send_event block in ErrorMessageReceived()

This commit is contained in:
Jonas Kvinge 2019-05-27 21:39:38 +02:00
parent 27b0e27cfd
commit e5f3123567
1 changed files with 1 additions and 1 deletions

View File

@ -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";