diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-11-05 07:17:10 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-11-05 07:17:10 +0000 |
commit | fedb1eca0723d217832ab8ecdad6c608fce981ca (patch) | |
tree | 56a08f423d449179bc4817a0799ea4b11a874fea /libavformat/mov.c | |
parent | 507330b9d32679df228df944ac4b515b29002d47 (diff) | |
download | ffmpeg-fedb1eca0723d217832ab8ecdad6c608fce981ca.tar.gz |
check that duration is set to avoid fpe
Originally committed as revision 20457 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 dfe50c1cf5..dc0135d8bd 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1500,7 +1500,8 @@ static void mov_build_index(MOVContext *mov, AVStream *st) } } } - st->codec->bit_rate = stream_size*8*sc->time_scale/st->duration; + if (st->duration > 0) + st->codec->bit_rate = stream_size*8*sc->time_scale/st->duration; } else { for (i = 0; i < sc->chunk_count; i++) { unsigned chunk_samples; |