Commit aef5c186 authored by conrad's avatar conrad

avoid divide by 0 in bitrate calculation (towards ticket:117)


git-svn-id: http://svn.annodex.net/liboggz/trunk@1228 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 677a29a3
......@@ -164,7 +164,8 @@ oggzinfo_trackinfo_new (void)
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment