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
abf1e59e
Commit
abf1e59e
authored
May 23, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libaacplus: return meaningful error codes
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
6d530344
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
libaacplus.c
libavcodec/libaacplus.c
+4
-4
No files found.
libavcodec/libaacplus.c
View file @
abf1e59e
...
...
@@ -43,19 +43,19 @@ static av_cold int aacPlus_encode_init(AVCodecContext *avctx)
/* number of channels */
if
(
avctx
->
channels
<
1
||
avctx
->
channels
>
2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"encoding %d channel(s) is not allowed
\n
"
,
avctx
->
channels
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
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
;
return
AVERROR
(
EINVAL
)
;
}
s
->
aacplus_handle
=
aacplusEncOpen
(
avctx
->
sample_rate
,
avctx
->
channels
,
&
s
->
samples_input
,
&
s
->
max_output_bytes
);
if
(
!
s
->
aacplus_handle
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"can't open encoder
\n
"
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
/* check aacplus version */
...
...
@@ -67,7 +67,7 @@ static av_cold int aacPlus_encode_init(AVCodecContext *avctx)
aacplus_cfg
->
inputFormat
=
avctx
->
sample_fmt
==
AV_SAMPLE_FMT_FLT
?
AACPLUS_INPUT_FLOAT
:
AACPLUS_INPUT_16BIT
;
if
(
!
aacplusEncSetConfiguration
(
s
->
aacplus_handle
,
aacplus_cfg
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"libaacplus doesn't support this output format!
\n
"
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
avctx
->
frame_size
=
s
->
samples_input
/
avctx
->
channels
;
...
...
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