Commit 77cf9eda authored by Jean-Marc Valin's avatar Jean-Marc Valin

opus_demo: fixes potential division by zero on files with no active frame

parent 6fa85632
......@@ -866,7 +866,7 @@ int main(int argc, char *argv[])
if (!decode_only)
fprintf (stderr, "active bitrate: %7.3f kb/s\n",
fprintf (stderr, "bitrate standard deviation: %7.3f kb/s\n",
1e-3*sqrt(bits2/count - bits*bits/(count*(double)count))*sampling_rate/frame_size);
/* Close any files to which intermediate results were stored */
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