diff options
author | Benjamin Larsson <benjamin@southpole.se> | 2011-10-29 12:57:10 +0200 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-10-29 07:59:05 -0700 |
commit | 69e7ad8dbc9896aff70f1f1125c726764f28455f (patch) | |
tree | 037079396fed109ef6d2d8158cdb0695205b0d2b /libavformat/mov.c | |
parent | 9a173575fd3bd9a4391f760484e918824204e618 (diff) | |
download | ffmpeg-69e7ad8dbc9896aff70f1f1125c726764f28455f.tar.gz |
mov: Avoid divide by zero in edit list dts handling
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 1747bd41a2..2036f5134a 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1605,7 +1605,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) if (sc->time_offset < 0) sc->time_offset = av_rescale(sc->time_offset, sc->time_scale, mov->time_scale); 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) { /* more than 16 frames delay, dts are likely wrong this happens with files created by iMovie */ |