diff --git a/libavformat/mov.c b/libavformat/mov.c index 00b3b25944..95b9cd3f8b 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3747,6 +3747,9 @@ static void mov_build_index(MOVContext *mov, AVStream *st) av_free(ctts_data_old); return; } + + memset((uint8_t*)(sc->ctts_data), 0, sc->ctts_allocated_size); + for (i = 0; i < ctts_count_old && sc->ctts_count < sc->sample_count; i++) for (j = 0; j < ctts_data_old[i].count &&