videodecoder: 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:08:10 +02:00 committed by Matthew Waters
parent 2dcdd13512
commit 6e9edc3031

View file

@ -2494,6 +2494,11 @@ gst_video_decoder_change_state (GstElement * element, GstStateChange transition)
if (decoder_class->start && !decoder_class->start (decoder))
goto start_failed;
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
GST_VIDEO_DECODER_STREAM_LOCK (decoder);
gst_video_decoder_flush (decoder, TRUE);
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
break;
default:
break;
}