videoencoder: flush encoder in transition PAUSED->READY

https://bugzilla.gnome.org/show_bug.cgi?id=787311
This commit is contained in:
Nicola Murino 2017-09-28 13:17:05 +02:00 committed by Matthew Waters
parent 6627dd3ae3
commit 877664a414

View file

@ -1526,6 +1526,11 @@ gst_video_encoder_change_state (GstElement * element, GstStateChange transition)
if (encoder_class->start && !encoder_class->start (encoder))
goto start_failed;
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
gst_video_encoder_flush (encoder);
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
break;
default:
break;
}