Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
892695c8
Commit
892695c8
authored
Oct 01, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libspeexdec: simplify setting of frame_size
parent
27c3f9c0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
libspeexdec.c
libavcodec/libspeexdec.c
+1
-5
No files found.
libavcodec/libspeexdec.c
View file @
892695c8
...
...
@@ -49,7 +49,6 @@ static av_cold int libspeex_decode_init(AVCodecContext *avctx)
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S16
;
if
(
s
->
header
)
{
avctx
->
channels
=
s
->
header
->
nb_channels
;
s
->
frame_size
=
s
->
header
->
frame_size
;
spx_mode
=
s
->
header
->
mode
;
}
else
{
switch
(
avctx
->
sample_rate
)
{
...
...
@@ -71,6 +70,7 @@ static av_cold int libspeex_decode_init(AVCodecContext *avctx)
return
AVERROR_INVALIDDATA
;
}
avctx
->
sample_rate
=
8000
<<
spx_mode
;
s
->
frame_size
=
160
<<
spx_mode
;
if
(
avctx
->
channels
<
1
||
avctx
->
channels
>
2
)
{
/* libspeex can handle mono or stereo if initialized as stereo */
...
...
@@ -88,10 +88,6 @@ static av_cold int libspeex_decode_init(AVCodecContext *avctx)
return
-
1
;
}
if
(
!
s
->
header
)
{
speex_decoder_ctl
(
s
->
dec_state
,
SPEEX_GET_FRAME_SIZE
,
&
s
->
frame_size
);
}
if
(
avctx
->
channels
==
2
)
{
SpeexCallback
callback
;
callback
.
callback_id
=
SPEEX_INBAND_STEREO
;
...
...
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