mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
baseparse: drain segment upon SEGMENT_DONE to ensure proper event order
This commit is contained in:
parent
84f0410186
commit
aca7faf520
1 changed files with 11 additions and 0 deletions
|
@ -1135,6 +1135,17 @@ gst_base_parse_sink_event_default (GstBaseParse * parse, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
case GST_EVENT_SEGMENT_DONE:
|
||||
/* need to drain now, rather than upon a new segment,
|
||||
* since that would have SEGMENT_DONE come before potential
|
||||
* delayed last part of the current segment */
|
||||
GST_DEBUG_OBJECT (parse, "draining current segment");
|
||||
if (parse->segment.rate > 0.0)
|
||||
gst_base_parse_drain (parse);
|
||||
else
|
||||
gst_base_parse_finish_fragment (parse, FALSE);
|
||||
break;
|
||||
|
||||
case GST_EVENT_FLUSH_START:
|
||||
GST_OBJECT_LOCK (parse);
|
||||
parse->priv->flushing = TRUE;
|
||||
|
|
Loading…
Reference in a new issue