[FFmpeg-devel] [PATCH 1/1] fix - increment index_entry_pos after log statement so that logs for index entries derived from trun atom use correct index

Nick Ryan nick.paul.ryan at gmail.com
Fri Sep 21 19:32:26 EEST 2018


Signed-off-by: Nick Ryan <nick.paul.ryan at gmail.com>
---
 libavformat/mov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index ec57a05803..540e5ca057 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4856,11 +4856,11 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 
         sc->ctts_data[index_entry_pos].count = 1;
         sc->ctts_data[index_entry_pos].duration = ctts_duration;
-        index_entry_pos++;
 
         av_log(c->fc, AV_LOG_TRACE, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
                 "size %u, distance %d, keyframe %d\n", st->index,
                 index_entry_pos, offset, dts, sample_size, distance, keyframe);
+        index_entry_pos++;
         distance++;
         dts += sample_duration;
         offset += sample_size;
-- 
2.17.1 (Apple Git-112)



More information about the ffmpeg-devel mailing list