Ticket #673: patchticket673.diff

File patchticket673.diff, 632 bytes (added by cehoyos, 5 years ago)
  • libavformat/mov.c

    diff --git a/libavformat/mov.c b/libavformat/mov.c
    index e940427..6355814 100644
    a b static void mov_build_index(MOVContext *mov, AVStream *st) 
    17611761            unsigned count, chunk_count; 
    17621762 
    17631763            chunk_samples = sc->stsc_data[i].count; 
    1764             if (sc->samples_per_frame && chunk_samples % sc->samples_per_frame) { 
     1764            if (i != sc->stsc_count - 1 && 
     1765                sc->samples_per_frame && chunk_samples % sc->samples_per_frame) { 
    17651766                av_log(mov->fc, AV_LOG_ERROR, "error unaligned chunk\n"); 
    17661767                return; 
    17671768            }