audiodecoder: flush decoder in transition PAUSED->READY

https://bugzilla.gnome.org/show_bug.cgi?id=787311
This commit is contained in:
Nicola Murino 2017-09-27 16:41:51 +02:00 committed by Matthew Waters
parent bcca3b926c
commit e7cf4c058d

View file

@ -2960,6 +2960,11 @@ gst_audio_decoder_change_state (GstElement * element, GstStateChange transition)
break; break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING: case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break; break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
GST_AUDIO_DECODER_STREAM_LOCK (codec);
gst_audio_decoder_flush (codec, TRUE);
GST_AUDIO_DECODER_STREAM_UNLOCK (codec);
break;
default: default:
break; break;
} }