mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
qtdemux: push data from adapter before starting new segment
The adapter might have data remaining from the previous segment, push it all before clearing the adapter and starting a new segment. It can accumulate data if it had pushed and got not-linked, returning immediately without processing all the data. Before starting a new segment this data should be handled.
This commit is contained in:
parent
6e7c724afa
commit
38520a1e12
1 changed files with 3 additions and 10 deletions
|
@ -2006,16 +2006,9 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent,
|
||||||
segment.stop = MAX (segment.stop, segment.start);
|
segment.stop = MAX (segment.stop, segment.start);
|
||||||
}
|
}
|
||||||
} else if (segment.format == GST_FORMAT_TIME) {
|
} else if (segment.format == GST_FORMAT_TIME) {
|
||||||
/* NOP */
|
/* push all data on the adapter before starting this
|
||||||
#if 0
|
* new segment */
|
||||||
gst_qtdemux_push_event (demux, gst_event_ref (event));
|
gst_qtdemux_process_adapter (demux, TRUE);
|
||||||
gst_event_new_new_segment_full (segment.update, segment.rate,
|
|
||||||
segment.arate, GST_FORMAT_TIME, segment.start, segment.stop,
|
|
||||||
segment.start);
|
|
||||||
gst_adapter_clear (demux->adapter);
|
|
||||||
demux->neededbytes = 16;
|
|
||||||
goto exit;
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG_OBJECT (demux, "unsupported segment format, ignoring");
|
GST_DEBUG_OBJECT (demux, "unsupported segment format, ignoring");
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
Loading…
Reference in a new issue