aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2007-07-14 12:42:57 +0000
committerMåns Rullgård <mans@mansr.com>2007-07-14 12:42:57 +0000
commitb3fc09254868c8b241649bcbb9b8ba0730acc797 (patch)
tree948168420a55216b4a5bd194cb99ab290bdf4b37 /libavformat/utils.c
parent7eed4aef83ea10d3dff3d526bb05165c093270b3 (diff)
downloadffmpeg-b3fc09254868c8b241649bcbb9b8ba0730acc797.tar.gz
avoid division by zero in av_find_stream_info() when no time base is set
Originally committed as revision 9637 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 453ff7f3f1..401e828790 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1891,7 +1891,7 @@ int av_find_stream_info(AVFormatContext *ic)
(st->codec->codec_id == CODEC_ID_MPEG4 && !st->need_parsing))*/)
try_decode_frame(st, pkt->data, pkt->size);
- if (av_rescale_q(codec_info_duration[st->index], st->time_base, AV_TIME_BASE_Q) >= ic->max_analyze_duration) {
+ if (st->time_base.den > 0 && av_rescale_q(codec_info_duration[st->index], st->time_base, AV_TIME_BASE_Q) >= ic->max_analyze_duration) {
break;
}
count++;