Mercurial > libavformat.hg
changeset 2253:3677c1667194 libavformat
avoid division by zero in av_find_stream_info() when no time base is set
author | mru |
---|---|
date | Sat, 14 Jul 2007 12:42:57 +0000 |
parents | 708e6e93d6f2 |
children | 10d22564eb8d |
files | utils.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Fri Jul 13 17:15:56 2007 +0000 +++ b/utils.c Sat Jul 14 12:42:57 2007 +0000 @@ -1891,7 +1891,7 @@ (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++;