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
facc48f1
Commit
facc48f1
authored
Apr 18, 2011
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvo-aacenc,libvo-amrwbenc}: fix api usage
Use the correct error codes and format identifier.
parent
139f3ac4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
libvo-aacenc.c
libavcodec/libvo-aacenc.c
+4
-4
libvo-amrwbenc.c
libavcodec/libvo-amrwbenc.c
+1
-1
No files found.
libavcodec/libvo-aacenc.c
View file @
facc48f1
...
@@ -59,7 +59,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
...
@@ -59,7 +59,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
if
(
s
->
codec_api
.
SetParam
(
s
->
handle
,
VO_PID_AAC_ENCPARAM
,
&
params
)
if
(
s
->
codec_api
.
SetParam
(
s
->
handle
,
VO_PID_AAC_ENCPARAM
,
&
params
)
!=
VO_ERR_NONE
)
{
!=
VO_ERR_NONE
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unable to set encoding parameters
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unable to set encoding parameters
\n
"
);
return
AVERROR
_UNKNOWN
;
return
AVERROR
(
EINVAL
)
;
}
}
for
(
index
=
0
;
index
<
16
;
index
++
)
for
(
index
=
0
;
index
<
16
;
index
++
)
...
@@ -68,7 +68,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
...
@@ -68,7 +68,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
if
(
index
==
16
)
{
if
(
index
==
16
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unsupported sample rate %d
\n
"
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unsupported sample rate %d
\n
"
,
avctx
->
sample_rate
);
avctx
->
sample_rate
);
return
AVERROR
_NOTSUPP
;
return
AVERROR
(
ENOSYS
)
;
}
}
if
(
avctx
->
flags
&
CODEC_FLAG_GLOBAL_HEADER
)
{
if
(
avctx
->
flags
&
CODEC_FLAG_GLOBAL_HEADER
)
{
avctx
->
extradata_size
=
2
;
avctx
->
extradata_size
=
2
;
...
@@ -110,14 +110,14 @@ static int aac_encode_frame(AVCodecContext *avctx,
...
@@ -110,14 +110,14 @@ static int aac_encode_frame(AVCodecContext *avctx,
if
(
s
->
codec_api
.
GetOutputData
(
s
->
handle
,
&
output
,
&
output_info
)
if
(
s
->
codec_api
.
GetOutputData
(
s
->
handle
,
&
output
,
&
output_info
)
!=
VO_ERR_NONE
)
{
!=
VO_ERR_NONE
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unable to encode frame
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unable to encode frame
\n
"
);
return
AVERROR
_UNKNOWN
;
return
AVERROR
(
EINVAL
)
;
}
}
return
output
.
Length
;
return
output
.
Length
;
}
}
AVCodec
ff_libvo_aacenc_encoder
=
{
AVCodec
ff_libvo_aacenc_encoder
=
{
"libvo_aacenc"
,
"libvo_aacenc"
,
CODEC
_TYPE_AUDIO
,
AVMEDIA
_TYPE_AUDIO
,
CODEC_ID_AAC
,
CODEC_ID_AAC
,
sizeof
(
AACContext
),
sizeof
(
AACContext
),
aac_encode_init
,
aac_encode_init
,
...
...
libavcodec/libvo-amrwbenc.c
View file @
facc48f1
...
@@ -119,7 +119,7 @@ static int amr_wb_encode_frame(AVCodecContext *avctx,
...
@@ -119,7 +119,7 @@ static int amr_wb_encode_frame(AVCodecContext *avctx,
AVCodec
ff_libvo_amrwbenc_encoder
=
{
AVCodec
ff_libvo_amrwbenc_encoder
=
{
"libvo_amrwbenc"
,
"libvo_amrwbenc"
,
CODEC
_TYPE_AUDIO
,
AVMEDIA
_TYPE_AUDIO
,
CODEC_ID_AMR_WB
,
CODEC_ID_AMR_WB
,
sizeof
(
AMRWBContext
),
sizeof
(
AMRWBContext
),
amr_wb_encode_init
,
amr_wb_encode_init
,
...
...
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