Browse Source

movdec: dont divide by zero when stts_data[0].duration = 0.

Fixes ticket223
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.8
Michael Niedermayer 14 years ago
parent
commit
f455f46455
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/mov.c

+ 1
- 1
libavformat/mov.c View File

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


Loading…
Cancel
Save