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
963c5800
Commit
963c5800
authored
May 23, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libaacplus: move profile check above, simplifies code a little
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
0fb7fef8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
libaacplus.c
libavcodec/libaacplus.c
+5
-7
No files found.
libavcodec/libaacplus.c
View file @
963c5800
...
...
@@ -46,6 +46,11 @@ static av_cold int aacPlus_encode_init(AVCodecContext *avctx)
return
-
1
;
}
if
(
avctx
->
profile
!=
FF_PROFILE_AAC_LOW
&&
avctx
->
profile
!=
FF_PROFILE_UNKNOWN
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"invalid AAC profile: %d, only LC supported
\n
"
,
avctx
->
profile
);
return
-
1
;
}
s
->
aacplus_handle
=
aacplusEncOpen
(
avctx
->
sample_rate
,
avctx
->
channels
,
&
s
->
samples_input
,
&
s
->
max_output_bytes
);
if
(
!
s
->
aacplus_handle
)
{
...
...
@@ -56,13 +61,6 @@ static av_cold int aacPlus_encode_init(AVCodecContext *avctx)
/* check aacplus version */
aacplus_cfg
=
aacplusEncGetCurrentConfiguration
(
s
->
aacplus_handle
);
/* put the options in the configuration struct */
if
(
avctx
->
profile
!=
FF_PROFILE_AAC_LOW
&&
avctx
->
profile
!=
FF_PROFILE_UNKNOWN
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"invalid AAC profile: %d, only LC supported
\n
"
,
avctx
->
profile
);
aacplusEncClose
(
s
->
aacplus_handle
);
return
-
1
;
}
aacplus_cfg
->
bitRate
=
avctx
->
bit_rate
;
aacplus_cfg
->
bandWidth
=
avctx
->
cutoff
;
aacplus_cfg
->
outputFormat
=
!
(
avctx
->
flags
&
CODEC_FLAG_GLOBAL_HEADER
);
...
...
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