aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2011-04-18 22:12:50 +0200
committerLuca Barbato <lu_zero@gentoo.org>2011-04-18 22:21:13 +0200
commitfacc48f157a282e9d99a9bf65f5985bace4606b9 (patch)
treef1d6e72dc6fa9dcffcfd5c1bd677ecaa6908a6f6 /libavcodec
parent139f3ac42dcf24eb8c59af4aaab4e9afdccbc996 (diff)
downloadffmpeg-facc48f157a282e9d99a9bf65f5985bace4606b9.tar.gz
libvo-aacenc,libvo-amrwbenc}: fix api usage
Use the correct error codes and format identifier.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libvo-aacenc.c8
-rw-r--r--libavcodec/libvo-amrwbenc.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/libvo-aacenc.c b/libavcodec/libvo-aacenc.c
index f2a19a1814..5a75bcbbb4 100644
--- a/libavcodec/libvo-aacenc.c
+++ b/libavcodec/libvo-aacenc.c
@@ -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)
!= VO_ERR_NONE) {
av_log(avctx, AV_LOG_ERROR, "Unable to set encoding parameters\n");
- return AVERROR_UNKNOWN;
+ return AVERROR(EINVAL);
}
for (index = 0; index < 16; index++)
@@ -68,7 +68,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
if (index == 16) {
av_log(avctx, AV_LOG_ERROR, "Unsupported sample rate %d\n",
avctx->sample_rate);
- return AVERROR_NOTSUPP;
+ return AVERROR(ENOSYS);
}
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
avctx->extradata_size = 2;
@@ -110,14 +110,14 @@ static int aac_encode_frame(AVCodecContext *avctx,
if (s->codec_api.GetOutputData(s->handle, &output, &output_info)
!= VO_ERR_NONE) {
av_log(avctx, AV_LOG_ERROR, "Unable to encode frame\n");
- return AVERROR_UNKNOWN;
+ return AVERROR(EINVAL);
}
return output.Length;
}
AVCodec ff_libvo_aacenc_encoder = {
"libvo_aacenc",
- CODEC_TYPE_AUDIO,
+ AVMEDIA_TYPE_AUDIO,
CODEC_ID_AAC,
sizeof(AACContext),
aac_encode_init,
diff --git a/libavcodec/libvo-amrwbenc.c b/libavcodec/libvo-amrwbenc.c
index d8a6099561..b3615ede42 100644
--- a/libavcodec/libvo-amrwbenc.c
+++ b/libavcodec/libvo-amrwbenc.c
@@ -119,7 +119,7 @@ static int amr_wb_encode_frame(AVCodecContext *avctx,
AVCodec ff_libvo_amrwbenc_encoder = {
"libvo_amrwbenc",
- CODEC_TYPE_AUDIO,
+ AVMEDIA_TYPE_AUDIO,
CODEC_ID_AMR_WB,
sizeof(AMRWBContext),
amr_wb_encode_init,