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
d582cc17
Commit
d582cc17
authored
Sep 21, 2019
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: use avpriv_mpeg4audio_get_config2()
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
f96a8b01
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
aac_adtstoasc_bsf.c
libavcodec/aac_adtstoasc_bsf.c
+2
-2
alsdec.c
libavcodec/alsdec.c
+2
-2
mpegaudiodec_template.c
libavcodec/mpegaudiodec_template.c
+2
-2
No files found.
libavcodec/aac_adtstoasc_bsf.c
View file @
d582cc17
...
@@ -134,8 +134,8 @@ static int aac_adtstoasc_init(AVBSFContext *ctx)
...
@@ -134,8 +134,8 @@ static int aac_adtstoasc_init(AVBSFContext *ctx)
/* Validate the extradata if the stream is already MPEG-4 AudioSpecificConfig */
/* Validate the extradata if the stream is already MPEG-4 AudioSpecificConfig */
if
(
ctx
->
par_in
->
extradata
)
{
if
(
ctx
->
par_in
->
extradata
)
{
MPEG4AudioConfig
mp4ac
;
MPEG4AudioConfig
mp4ac
;
int
ret
=
avpriv_mpeg4audio_get_config
(
&
mp4ac
,
ctx
->
par_in
->
extradata
,
int
ret
=
avpriv_mpeg4audio_get_config
2
(
&
mp4ac
,
ctx
->
par_in
->
extradata
,
ctx
->
par_in
->
extradata_size
*
8
,
1
);
ctx
->
par_in
->
extradata_size
,
1
,
ctx
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Error parsing AudioSpecificConfig extradata!
\n
"
);
av_log
(
ctx
,
AV_LOG_ERROR
,
"Error parsing AudioSpecificConfig extradata!
\n
"
);
return
ret
;
return
ret
;
...
...
libavcodec/alsdec.c
View file @
d582cc17
...
@@ -302,8 +302,8 @@ static av_cold int read_specific_config(ALSDecContext *ctx)
...
@@ -302,8 +302,8 @@ static av_cold int read_specific_config(ALSDecContext *ctx)
if
((
ret
=
init_get_bits8
(
&
gb
,
avctx
->
extradata
,
avctx
->
extradata_size
))
<
0
)
if
((
ret
=
init_get_bits8
(
&
gb
,
avctx
->
extradata
,
avctx
->
extradata_size
))
<
0
)
return
ret
;
return
ret
;
config_offset
=
avpriv_mpeg4audio_get_config
(
&
m4ac
,
avctx
->
extradata
,
config_offset
=
avpriv_mpeg4audio_get_config
2
(
&
m4ac
,
avctx
->
extradata
,
avctx
->
extradata_size
*
8
,
1
);
avctx
->
extradata_size
,
1
,
avctx
);
if
(
config_offset
<
0
)
if
(
config_offset
<
0
)
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
...
...
libavcodec/mpegaudiodec_template.c
View file @
d582cc17
...
@@ -1851,8 +1851,8 @@ static av_cold int decode_init_mp3on4(AVCodecContext * avctx)
...
@@ -1851,8 +1851,8 @@ static av_cold int decode_init_mp3on4(AVCodecContext * avctx)
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
avpriv_mpeg4audio_get_config
(
&
cfg
,
avctx
->
extradata
,
avpriv_mpeg4audio_get_config
2
(
&
cfg
,
avctx
->
extradata
,
avctx
->
extradata_size
*
8
,
1
);
avctx
->
extradata_size
,
1
,
avctx
);
if
(
!
cfg
.
chan_config
||
cfg
.
chan_config
>
7
)
{
if
(
!
cfg
.
chan_config
||
cfg
.
chan_config
>
7
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid channel config number.
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid channel config number.
\n
"
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
...
...
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