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
fc43fc9f
Commit
fc43fc9f
authored
Oct 28, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsmdec: add flush function to reset the decoder state when seeking
parent
b03761b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
gsmdec.c
libavcodec/gsmdec.c
+8
-0
No files found.
libavcodec/gsmdec.c
View file @
fc43fc9f
...
@@ -87,6 +87,12 @@ static int gsm_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -87,6 +87,12 @@ static int gsm_decode_frame(AVCodecContext *avctx, void *data,
return
avctx
->
block_align
;
return
avctx
->
block_align
;
}
}
static
void
gsm_flush
(
AVCodecContext
*
avctx
)
{
GSMContext
*
s
=
avctx
->
priv_data
;
memset
(
s
,
0
,
sizeof
(
*
s
));
}
AVCodec
ff_gsm_decoder
=
{
AVCodec
ff_gsm_decoder
=
{
.
name
=
"gsm"
,
.
name
=
"gsm"
,
.
type
=
AVMEDIA_TYPE_AUDIO
,
.
type
=
AVMEDIA_TYPE_AUDIO
,
...
@@ -94,6 +100,7 @@ AVCodec ff_gsm_decoder = {
...
@@ -94,6 +100,7 @@ AVCodec ff_gsm_decoder = {
.
priv_data_size
=
sizeof
(
GSMContext
),
.
priv_data_size
=
sizeof
(
GSMContext
),
.
init
=
gsm_init
,
.
init
=
gsm_init
,
.
decode
=
gsm_decode_frame
,
.
decode
=
gsm_decode_frame
,
.
flush
=
gsm_flush
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"GSM"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"GSM"
),
};
};
...
@@ -104,5 +111,6 @@ AVCodec ff_gsm_ms_decoder = {
...
@@ -104,5 +111,6 @@ AVCodec ff_gsm_ms_decoder = {
.
priv_data_size
=
sizeof
(
GSMContext
),
.
priv_data_size
=
sizeof
(
GSMContext
),
.
init
=
gsm_init
,
.
init
=
gsm_init
,
.
decode
=
gsm_decode_frame
,
.
decode
=
gsm_decode_frame
,
.
flush
=
gsm_flush
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"GSM Microsoft variant"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"GSM Microsoft variant"
),
};
};
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