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
2d326793
Commit
2d326793
authored
Apr 12, 2011
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvo-aacenc: Only produce extradata if the global header flag is set
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
451d566f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
libvo-aacenc.c
libavcodec/libvo-aacenc.c
+10
-8
No files found.
libavcodec/libvo-aacenc.c
View file @
2d326793
...
...
@@ -62,12 +62,6 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
return
AVERROR_UNKNOWN
;
}
avctx
->
extradata_size
=
2
;
avctx
->
extradata
=
av_mallocz
(
avctx
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
avctx
->
extradata
)
return
AVERROR
(
ENOMEM
);
for
(
index
=
0
;
index
<
16
;
index
++
)
if
(
avctx
->
sample_rate
==
ff_mpeg4audio_sample_rates
[
index
])
break
;
...
...
@@ -76,8 +70,16 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
avctx
->
sample_rate
);
return
AVERROR_NOTSUPP
;
}
avctx
->
extradata
[
0
]
=
0x02
<<
3
|
index
>>
1
;
avctx
->
extradata
[
1
]
=
(
index
&
0x01
)
<<
7
|
avctx
->
channels
<<
3
;
if
(
avctx
->
flags
&
CODEC_FLAG_GLOBAL_HEADER
)
{
avctx
->
extradata_size
=
2
;
avctx
->
extradata
=
av_mallocz
(
avctx
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
avctx
->
extradata
)
return
AVERROR
(
ENOMEM
);
avctx
->
extradata
[
0
]
=
0x02
<<
3
|
index
>>
1
;
avctx
->
extradata
[
1
]
=
(
index
&
0x01
)
<<
7
|
avctx
->
channels
<<
3
;
}
return
0
;
}
...
...
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