[FFmpeg-cvslog] avformat/movenc: don't look at previous track_id as it may not be set

James Almer git at videolan.org
Tue Aug 13 05:13:03 EEST 2024


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun Aug 11 23:14:59 2024 -0300| [472fbee8124dc1d4417507f1d8fd721e449658be] | committer: James Almer

avformat/movenc: don't look at previous track_id as it may not be set

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=472fbee8124dc1d4417507f1d8fd721e449658be
---

 libavformat/movenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 8d91059081..d20e45cf81 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -4952,7 +4952,7 @@ static int mov_setup_track_ids(MOVMuxContext *mov, AVFormatContext *s)
             last_track_id =
             mov->tracks[i].track_id = (mov->tracks[i].st
                                        ? FFMAX(mov->tracks[i].st->index, last_track_id)
-                                       : FFMAX((i ? mov->tracks[i - 1].track_id : i), last_track_id)) + 1;
+                                       : FFMAX(i, last_track_id)) + 1;
         }
     }
 



More information about the ffmpeg-cvslog mailing list