]> git.sesse.net Git - ffmpeg/commitdiff
movenc: Update a comment to reflect how the code actually behaves
authorMartin Storsjö <martin@martin.st>
Tue, 19 Apr 2016 11:07:25 +0000 (14:07 +0300)
committerMartin Storsjö <martin@martin.st>
Tue, 19 Apr 2016 19:43:00 +0000 (22:43 +0300)
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>
libavformat/movenc.c

index 446c1ad2ee5a5c48b89f35b8f0a66e02d194e2da..78ff4ee8ac49ac31debaa8f1c9ae03c3eb591ac3 100644 (file)
@@ -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;