summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-19 12:47:15 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-19 12:47:19 +0100
commit3602782429ef3fceafd78c52014088655e4256a4 (patch)
tree5feffa9a0d571bda2c8ee29332e40c9dc4404fb7 /libavformat
parent4631d4bec37cfa6a86693684af7d0f73be7021cb (diff)
parenteee13d653953083553cceadbbedf6222ef78a006 (diff)
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>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 795d007887..ef8a1d2d73 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -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