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
908e22b9
Commit
908e22b9
authored
Oct 01, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libspeexdec: move the SpeexHeader from LibSpeexContext to where it is used
parent
892695c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
libspeexdec.c
libavcodec/libspeexdec.c
+6
-8
No files found.
libavcodec/libspeexdec.c
View file @
908e22b9
...
...
@@ -32,7 +32,6 @@ typedef struct {
SpeexBits
bits
;
SpeexStereoState
stereo
;
void
*
dec_state
;
SpeexHeader
*
header
;
int
frame_size
;
}
LibSpeexContext
;
...
...
@@ -43,13 +42,13 @@ static av_cold int libspeex_decode_init(AVCodecContext *avctx)
const
SpeexMode
*
mode
;
int
spx_mode
;
if
(
avctx
->
extradata_size
>=
80
)
s
->
header
=
speex_packet_to_header
(
avctx
->
extradata
,
avctx
->
extradata_size
);
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S16
;
if
(
s
->
header
)
{
avctx
->
channels
=
s
->
header
->
nb_channels
;
spx_mode
=
s
->
header
->
mode
;
if
(
avctx
->
extradata
&&
avctx
->
extradata_size
>=
80
)
{
SpeexHeader
*
header
=
speex_packet_to_header
(
avctx
->
extradata
,
avctx
->
extradata_size
);
avctx
->
channels
=
header
->
nb_channels
;
spx_mode
=
header
->
mode
;
speex_header_free
(
header
);
}
else
{
switch
(
avctx
->
sample_rate
)
{
case
8000
:
spx_mode
=
0
;
break
;
...
...
@@ -153,7 +152,6 @@ static av_cold int libspeex_decode_close(AVCodecContext *avctx)
{
LibSpeexContext
*
s
=
avctx
->
priv_data
;
speex_header_free
(
s
->
header
);
speex_bits_destroy
(
&
s
->
bits
);
speex_decoder_destroy
(
s
->
dec_state
);
...
...
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