diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-05-22 21:26:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-22 21:31:28 +0200 |
commit | f455f46455ae258d2d0ebc50a2e991fa020ba92d (patch) | |
tree | 7a2ce879797e222cacc6dc3ab6837c78564bd49a /libavformat/mov.c | |
parent | a0cd98b5943a7807aff837f9adba1dd034ec2272 (diff) | |
download | ffmpeg-f455f46455ae258d2d0ebc50a2e991fa020ba92d.tar.gz |
movdec: dont divide by zero when stts_data[0].duration = 0.
Fixes ticket223
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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 26e7a3a2df..726ec1e4b1 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -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; |