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
5669ae84
Commit
5669ae84
authored
Feb 11, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/mpegaudio_parser: treat codec_id like the other parameters
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
d3068d25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
mpegaudio_parser.c
libavcodec/mpegaudio_parser.c
+3
-1
No files found.
libavcodec/mpegaudio_parser.c
View file @
5669ae84
...
...
@@ -64,10 +64,11 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
}
else
{
while
(
i
<
buf_size
){
int
ret
,
sr
,
channels
,
bit_rate
,
frame_size
;
enum
AVCodecID
codec_id
;
state
=
(
state
<<
8
)
+
buf
[
i
++
];
ret
=
avpriv_mpa_decode_header
(
avctx
,
state
,
&
sr
,
&
channels
,
&
frame_size
,
&
bit_rate
);
ret
=
avpriv_mpa_decode_header
2
(
state
,
&
sr
,
&
channels
,
&
frame_size
,
&
bit_rate
,
&
codec_id
);
if
(
ret
<
4
)
{
if
(
i
>
4
)
s
->
header_count
=
-
2
;
...
...
@@ -82,6 +83,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
avctx
->
sample_rate
=
sr
;
avctx
->
channels
=
channels
;
s1
->
duration
=
frame_size
;
avctx
->
codec_id
=
codec_id
;
if
(
s
->
no_bitrate
||
!
avctx
->
bit_rate
)
{
s
->
no_bitrate
=
1
;
avctx
->
bit_rate
+=
(
bit_rate
-
avctx
->
bit_rate
)
/
s
->
header_count
;
...
...
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