Commit 36027824 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'eee13d65'

* commit 'eee13d65':
  movenc: Only adjust the cts offset at the start of fragments if necessary
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 4631d4be eee13d65
......@@ -4429,10 +4429,12 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
* of this packet to be what the previous packets duration implies. */
trk->cluster[trk->entry].dts = trk->start_dts + trk->track_duration;
/* We also may have written the pts and the corresponding duration
* in sidx tags; make sure the sidx pts and duration match up with
* in sidx/tfrf/tfxd tags; make sure the sidx pts and duration match up with
* the next fragment. This means the cts of the first sample must
* be the same in all fragments. */
pkt->pts = pkt->dts + trk->start_cts;
if ((mov->flags & FF_MOV_FLAG_DASH && !(mov->flags & FF_MOV_FLAG_FASTSTART)) ||
mov->mode == MODE_ISM)
pkt->pts = pkt->dts + trk->start_cts;
} else {
/* New fragment, but discontinuous from previous fragments.
* Pretend the duration sum of the earlier fragments is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment