Mercurial > libavformat.hg
changeset 2962:0cf3b8359da8 libavformat
ensure av_rescale_q() can be calculated (won't divide by zero)
author | aurel |
---|---|
date | Mon, 21 Jan 2008 23:43:25 +0000 |
parents | b9a3b81c5eb8 |
children | 6bee167191aa |
files | utils.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Mon Jan 21 14:28:58 2008 +0000 +++ b/utils.c Mon Jan 21 23:43:25 2008 +0000 @@ -1426,7 +1426,7 @@ duration = INT64_MIN; for(i = 0;i < ic->nb_streams; i++) { st = ic->streams[i]; - if (st->start_time != AV_NOPTS_VALUE) { + if (st->start_time != AV_NOPTS_VALUE && st->time_base.den) { start_time1= av_rescale_q(st->start_time, st->time_base, AV_TIME_BASE_Q); if (start_time1 < start_time) start_time = start_time1;