mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
qtdemux: avoid storing non-time newsegments to push later
This can confuse downstream when they get a byte segment after receiving the natural time segment from qtdemux that it sends when starting to push buffers. This is specially the case with parsers that try to convert the position from byte to time format and might miss the correct position for playback to start.
This commit is contained in:
parent
895525b5cb
commit
d1b91c755c
1 changed files with 8 additions and 3 deletions
|
@ -1829,9 +1829,14 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent,
|
|||
GST_DEBUG_OBJECT (demux, "received newsegment %" GST_SEGMENT_FORMAT,
|
||||
&segment);
|
||||
|
||||
GST_DEBUG_OBJECT (demux, "new pending_newsegment");
|
||||
gst_event_replace (&demux->pending_newsegment, event);
|
||||
demux->upstream_newsegment = TRUE;
|
||||
if (segment.format == GST_FORMAT_TIME) {
|
||||
GST_DEBUG_OBJECT (demux, "new pending_newsegment");
|
||||
gst_event_replace (&demux->pending_newsegment, event);
|
||||
demux->upstream_newsegment = TRUE;
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (demux, "Not storing upstream newsegment, "
|
||||
"not in time format");
|
||||
}
|
||||
|
||||
/* chain will send initial newsegment after pads have been added */
|
||||
if (demux->state != QTDEMUX_STATE_MOVIE || !demux->n_streams) {
|
||||
|
|
Loading…
Reference in a new issue