# HG changeset patch # User aurel # Date 1200959005 0 # Node ID 0cf3b8359da84c230bccfcf5f0863ba18586424c # Parent b9a3b81c5eb8a83436a0fca42f06e3d71cfc953f ensure av_rescale_q() can be calculated (won't divide by zero) diff -r b9a3b81c5eb8 -r 0cf3b8359da8 utils.c --- 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;