Mercurial > libavformat.hg
diff utils.c @ 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 | 86ab3f8db16c |
children | 910ac68ab3b5 |
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;