summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2016-04-19 14:07:25 +0300
committerMartin Storsjö <martin@martin.st>2016-04-19 22:43:00 +0300
commit0abb07bad7026a945a31ba4047e6583c8b3fa3da (patch)
tree0b3c695376748e6d11e0fba58e9db0e11e6ce4b4 /libavformat
parent79fdbfdb3e50f3f906903e027714ee04c1a00e89 (diff)
movenc: Update a comment to reflect how the code actually behaves
This codepath isn't quite as bad as it used to sound, if fragments are cut automatically at video packets. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 446c1ad2ee..78ff4ee8ac 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3495,7 +3495,8 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
/* We also may have written the pts and the corresponding duration
* 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. */
+ * be the same in all fragments, unless end_pts was updated by
+ * the packet causing the fragment to be written. */
if ((mov->flags & FF_MOV_FLAG_DASH && !(mov->flags & FF_MOV_FLAG_GLOBAL_SIDX)) ||
mov->mode == MODE_ISM)
pkt->pts = pkt->dts + trk->end_pts - trk->cluster[trk->entry].dts;