Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
bdd02802
Commit
bdd02802
authored
Feb 14, 2008
by
Jean-Marc Valin
Browse files
setting nb channels automatically from the mode.
parent
0d28aa99
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/celtdec.c
View file @
bdd02802
...
...
@@ -296,11 +296,14 @@ static CELTDecoder *process_header(ogg_packet *op, celt_int32_t enh_enabled, cel
celt_header_from_packet
((
char
*
)
op
->
packet
,
op
->
bytes
,
&
header
);
if
(
header
.
mode
==
0
)
{
mode
=
celt_mono
;
else
if
(
header
.
mode
==
1
)
mode
=
celt_stereo
;
else
*
channels
=
1
;
}
else
if
(
header
.
mode
==
1
)
{
mode
=
celt_stereo
;
*
channels
=
2
;
}
else
{
fprintf
(
stderr
,
"Invalid mode: %d
\n
"
,
header
.
mode
);
return
NULL
;
}
...
...
@@ -321,9 +324,6 @@ static CELTDecoder *process_header(ogg_packet *op, celt_int32_t enh_enabled, cel
*
nframes
=
1
;
if
(
*
channels
==-
1
)
*
channels
=
header
.
nb_channels
;
if
(
!
quiet
)
{
fprintf
(
stderr
,
"Decoding %d Hz audio in"
,
*
rate
);
...
...
Write
Preview
Supports
Markdown
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