Browse Source

mov: Avoid divide by zero in edit list dts handling

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
tags/n0.9
Benjamin Larsson Ronald S. Bultje 14 years ago
parent
commit
69e7ad8dbc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/mov.c

+ 1
- 1
libavformat/mov.c View File

@@ -1605,7 +1605,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
if (sc->time_offset < 0) if (sc->time_offset < 0)
sc->time_offset = av_rescale(sc->time_offset, sc->time_scale, mov->time_scale); sc->time_offset = av_rescale(sc->time_offset, sc->time_scale, mov->time_scale);
current_dts = -sc->time_offset; current_dts = -sc->time_offset;
if (sc->ctts_data && sc->stts_data &&
if (sc->ctts_data && sc->stts_data && sc->stts_data[0].duration &&
sc->ctts_data[0].duration / sc->stts_data[0].duration > 16) { sc->ctts_data[0].duration / sc->stts_data[0].duration > 16) {
/* more than 16 frames delay, dts are likely wrong /* more than 16 frames delay, dts are likely wrong
this happens with files created by iMovie */ this happens with files created by iMovie */


Loading…
Cancel
Save