diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2011-01-05 19:14:44 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2011-01-05 19:14:44 +0000 |
commit | 4af7166fb4a1334fe05f7aa483fcc1cc8560acc1 (patch) | |
tree | b63d81af8bbfdc97add9e5a47dee74e8d69f20c6 /libavformat/mov.c | |
parent | 9be52d48d9137e05361dd1ffb6b1fb3677e1fb47 (diff) | |
download | ffmpeg-4af7166fb4a1334fe05f7aa483fcc1cc8560acc1.tar.gz |
In mov demuxer, check that stts data exists, fix crash, issue #2479
Originally committed as revision 26227 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 9788e41a3e..2ceb21c705 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1515,7 +1515,8 @@ static void mov_build_index(MOVContext *mov, AVStream *st) if (sc->time_offset) { 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->ctts_data[0].duration / sc->stts_data[0].duration > 16) { + if (sc->ctts_data && sc->stts_data && + 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 */ sc->wrong_dts = 1; |