[cvs-annodex] commit (/annodex): liboggz/trunk/src/tools/oggzinfo.c
conrad
nobody at lists.annodex.net
Sun Apr 10 13:16:00 EST 2005
Update of /annodex (new revision 1228)
Modified files:
liboggz/trunk/src/tools/oggzinfo.c
Log Message:
avoid divide by 0 in bitrate calculation (towards ticket:117)
Modified: liboggz/trunk/src/tools/oggzinfo.c
===================================================================
--- liboggz/trunk/src/tools/oggzinfo.c 2005-04-10 03:01:43 UTC (rev 1227)
+++ liboggz/trunk/src/tools/oggzinfo.c 2005-04-10 03:15:59 UTC (rev 1228)
@@ -164,7 +164,8 @@
static long
oi_bitrate (long bytes, ogg_int64_t ms)
{
- return (long) (((ogg_int64_t)bytes * 8 * 1000) / ms);
+ if (ms == 0) return 0;
+ else return (long) (((ogg_int64_t)bytes * 8 * 1000) / ms);
}
static void
--
conrad
More information about the cvs-annodex
mailing list