Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Mark Harris
Opus
Commits
77cf9eda
Commit
77cf9eda
authored
Dec 04, 2015
by
Jean-Marc Valin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opus_demo: fixes potential division by zero on files with no active frame
parent
6fa85632
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/opus_demo.c
src/opus_demo.c
+1
-1
No files found.
src/opus_demo.c
View file @
77cf9eda
...
...
@@ -866,7 +866,7 @@ int main(int argc, char *argv[])
1e-3
*
bits_max
*
sampling_rate
/
frame_size
);
if
(
!
decode_only
)
fprintf
(
stderr
,
"active bitrate: %7.3f kb/s
\n
"
,
1e-3
*
bits_act
*
sampling_rate
/
(
frame_size
*
(
double
)
count_act
));
1e-3
*
bits_act
*
sampling_rate
/
(
1e-15
+
frame_size
*
(
double
)
count_act
));
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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment