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
2460b168
Commit
2460b168
authored
Jan 13, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsm parser: set duration
parent
7575ffac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
gsm_parser.c
libavcodec/gsm_parser.c
+12
-2
No files found.
libavcodec/gsm_parser.c
View file @
2460b168
...
...
@@ -31,6 +31,7 @@
typedef
struct
GSMParseContext
{
ParseContext
pc
;
int
block_size
;
int
duration
;
int
remaining
;
}
GSMParseContext
;
...
...
@@ -44,8 +45,14 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
if
(
!
s
->
block_size
)
{
switch
(
avctx
->
codec_id
)
{
case
CODEC_ID_GSM
:
s
->
block_size
=
GSM_BLOCK_SIZE
;
break
;
case
CODEC_ID_GSM_MS
:
s
->
block_size
=
GSM_MS_BLOCK_SIZE
;
break
;
case
CODEC_ID_GSM
:
s
->
block_size
=
GSM_BLOCK_SIZE
;
s
->
duration
=
GSM_FRAME_SIZE
;
break
;
case
CODEC_ID_GSM_MS
:
s
->
block_size
=
GSM_MS_BLOCK_SIZE
;
s
->
duration
=
GSM_FRAME_SIZE
*
2
;
break
;
default:
return
AVERROR
(
EINVAL
);
}
...
...
@@ -66,6 +73,9 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
*
poutbuf_size
=
0
;
return
buf_size
;
}
s1
->
duration
=
s
->
duration
;
*
poutbuf
=
buf
;
*
poutbuf_size
=
buf_size
;
return
next
;
...
...
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