1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit 'eee13d653953083553cceadbbedf6222ef78a006'

* commit 'eee13d653953083553cceadbbedf6222ef78a006':
  movenc: Only adjust the cts offset at the start of fragments if necessary

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-03-19 12:47:15 +01:00
commit 3602782429

View File

@ -4429,9 +4429,11 @@ 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. */
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.