mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
qtdemux: Adjust segment according to ctts offset
In presence of a CTTS, the segment start/stop must be offset so the segment start/stop include the PTS. This is needed since the PTS cannot be negative in this format. This fixes issues where the running time of the first buffer isn't at the start. https://bugzilla.gnome.org/show_bug.cgi?id=740575
This commit is contained in:
parent
12181efddc
commit
135e516730
1 changed files with 5 additions and 3 deletions
|
@ -3749,10 +3749,12 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream,
|
|||
stream->segment.base = qtdemux->segment.base;
|
||||
stream->segment.applied_rate = qtdemux->segment.applied_rate;
|
||||
stream->segment.rate = rate;
|
||||
stream->segment.start = start;
|
||||
stream->segment.stop = stop;
|
||||
stream->segment.start = start +
|
||||
QTSTREAMTIME_TO_GSTTIME (stream, stream->ctts_soffset);
|
||||
stream->segment.stop = stop +
|
||||
QTSTREAMTIME_TO_GSTTIME (stream, stream->ctts_soffset);
|
||||
stream->segment.time = time;
|
||||
stream->segment.position = start;
|
||||
stream->segment.position = stream->segment.start;
|
||||
|
||||
/* now prepare and send the segment */
|
||||
if (stream->pad) {
|
||||
|
|
Loading…
Reference in a new issue