mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
qtdemux: Only activate segments and send SEGMENT events if we have streams
But in that case also remove the pending newsegment event, otherwise we would later send a possibly outdated event. https://bugzilla.gnome.org/show_bug.cgi?id=767071
This commit is contained in:
parent
f8eb909d90
commit
84e698c531
1 changed files with 4 additions and 1 deletions
|
@ -2163,7 +2163,10 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent,
|
||||||
GST_DEBUG_OBJECT (demux, "Pushing newseg %" GST_SEGMENT_FORMAT, &segment);
|
GST_DEBUG_OBJECT (demux, "Pushing newseg %" GST_SEGMENT_FORMAT, &segment);
|
||||||
|
|
||||||
/* map segment to internal qt segments and push on each stream */
|
/* map segment to internal qt segments and push on each stream */
|
||||||
gst_qtdemux_map_and_push_segments (demux, &segment);
|
if (demux->n_streams) {
|
||||||
|
gst_event_replace (&demux->pending_newsegment, NULL);
|
||||||
|
gst_qtdemux_map_and_push_segments (demux, &segment);
|
||||||
|
}
|
||||||
|
|
||||||
/* clear leftover in current segment, if any */
|
/* clear leftover in current segment, if any */
|
||||||
gst_adapter_clear (demux->adapter);
|
gst_adapter_clear (demux->adapter);
|
||||||
|
|
Loading…
Reference in a new issue