videorate: flush remaining buffers on SEGMENT_DONE

Just as we do on EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=784666
This commit is contained in:
Mathieu Duponchelle 2017-04-07 20:41:57 +02:00 committed by Nicolas Dufresne
parent 6461ad057c
commit 875af55937

View file

@ -827,11 +827,13 @@ gst_video_rate_sink_event (GstBaseTransform * trans, GstEvent * event)
break; break;
} }
case GST_EVENT_SEGMENT_DONE:
case GST_EVENT_EOS:{ case GST_EVENT_EOS:{
gint count = 0; gint count = 0;
GstFlowReturn res = GST_FLOW_OK; GstFlowReturn res = GST_FLOW_OK;
GST_DEBUG_OBJECT (videorate, "Got EOS"); GST_DEBUG_OBJECT (videorate, "Got %s",
gst_event_type_get_name (GST_EVENT_TYPE (event)));
/* If the segment has a stop position, fill the segment */ /* If the segment has a stop position, fill the segment */
if (GST_CLOCK_TIME_IS_VALID (videorate->segment.stop)) { if (GST_CLOCK_TIME_IS_VALID (videorate->segment.stop)) {