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
132846b0
Commit
132846b0
authored
Dec 15, 2011
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aacdec: Handle new extradata passed as side data
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
251f320f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
aacdec.c
libavcodec/aacdec.c
+19
-0
No files found.
libavcodec/aacdec.c
View file @
132846b0
...
...
@@ -2247,12 +2247,31 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
static
int
aac_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
got_frame_ptr
,
AVPacket
*
avpkt
)
{
AACContext
*
ac
=
avctx
->
priv_data
;
const
uint8_t
*
buf
=
avpkt
->
data
;
int
buf_size
=
avpkt
->
size
;
GetBitContext
gb
;
int
buf_consumed
;
int
buf_offset
;
int
err
;
int
new_extradata_size
;
const
uint8_t
*
new_extradata
=
av_packet_get_side_data
(
avpkt
,
AV_PKT_DATA_NEW_EXTRADATA
,
&
new_extradata_size
);
if
(
new_extradata
)
{
av_free
(
avctx
->
extradata
);
avctx
->
extradata
=
av_mallocz
(
new_extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
avctx
->
extradata
)
return
AVERROR
(
ENOMEM
);
avctx
->
extradata_size
=
new_extradata_size
;
memcpy
(
avctx
->
extradata
,
new_extradata
,
new_extradata_size
);
if
(
decode_audio_specific_config
(
ac
,
ac
->
avctx
,
&
ac
->
m4ac
,
avctx
->
extradata
,
avctx
->
extradata_size
*
8
,
1
)
<
0
)
return
AVERROR_INVALIDDATA
;
}
init_get_bits
(
&
gb
,
buf
,
buf_size
*
8
);
...
...
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