---
 libavcodec/libopencore-amr.c |   16 ++++++++--------
 libavcodec/libvo-amrwbenc.c  |    8 ++++----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index e6958c9..8a8c18b 100644
--- a/libavcodec/libopencore-amr.c
+++ b/libavcodec/libopencore-amr.c
@@ -90,7 +90,7 @@ static av_cold int amr_nb_decode_init(AVCodecContext *avctx)
 
     if (avctx->channels > 1) {
         av_log(avctx, AV_LOG_ERROR, "amr_nb: multichannel decoding not 
supported\n");
-        return -1;
+        return AVERROR(ENOSYS);
     }
 
     return 0;
@@ -121,7 +121,7 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void 
*data,
     if (packet_size > buf_size) {
         av_log(avctx, AV_LOG_ERROR, "amr frame too short (%u, should be %u)\n",
                buf_size, packet_size);
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
 
     /* call decoder */
@@ -149,12 +149,12 @@ static av_cold int amr_nb_encode_init(AVCodecContext 
*avctx)
 
     if (avctx->sample_rate != 8000) {
         av_log(avctx, AV_LOG_ERROR, "Only 8000Hz sample rate supported\n");
-        return -1;
+        return AVERROR(ENOSYS);
     }
 
     if (avctx->channels != 1) {
         av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
-        return -1;
+        return AVERROR(ENOSYS);
     }
 
     avctx->frame_size  = 160;
@@ -168,7 +168,7 @@ static av_cold int amr_nb_encode_init(AVCodecContext *avctx)
 
     if ((s->enc_bitrate = getBitrateMode(avctx->bit_rate)) < 0) {
         av_log(avctx, AV_LOG_ERROR, nb_bitrate_unsupported);
-        return -1;
+        return AVERROR(ENOSYS);
     }
 
     return 0;
@@ -192,7 +192,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx,
 
     if ((s->enc_bitrate = getBitrateMode(avctx->bit_rate)) < 0) {
         av_log(avctx, AV_LOG_ERROR, nb_bitrate_unsupported);
-        return -1;
+        return AVERROR(ENOSYS);
     }
 
     written = Encoder_Interface_Encode(s->enstate, s->enc_bitrate, data,
@@ -236,7 +236,7 @@ static av_cold int amr_wb_decode_init(AVCodecContext *avctx)
 
     if (avctx->channels > 1) {
         av_log(avctx, AV_LOG_ERROR, "amr_wb: multichannel decoding not 
supported\n");
-        return -1;
+        return AVERROR(ENOSYS);
     }
 
     return 0;
@@ -263,7 +263,7 @@ static int amr_wb_decode_frame(AVCodecContext *avctx, void 
*data,
     if (packet_size > buf_size) {
         av_log(avctx, AV_LOG_ERROR, "amr frame too short (%u, should be %u)\n",
                buf_size, packet_size + 1);
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
 
     D_IF_decode(s->state, amrData, data, _good_frame);
diff --git a/libavcodec/libvo-amrwbenc.c b/libavcodec/libvo-amrwbenc.c
index 661a15d..a5e8f39 100644
--- a/libavcodec/libvo-amrwbenc.c
+++ b/libavcodec/libvo-amrwbenc.c
@@ -65,17 +65,17 @@ static av_cold int amr_wb_encode_init(AVCodecContext *avctx)
 
     if (avctx->sample_rate != 16000) {
         av_log(avctx, AV_LOG_ERROR, "Only 16000Hz sample rate supported\n");
-        return -1;
+        return AVERROR(ENOSYS);
     }
 
     if (avctx->channels != 1) {
         av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
-        return -1;
+        return AVERROR(ENOSYS);
     }
 
     if ((s->mode = getWBBitrateMode(avctx->bit_rate)) < 0) {
         av_log(avctx, AV_LOG_ERROR, wb_bitrate_unsupported);
-        return -1;
+        return AVERROR(ENOSYS);
     }
 
     avctx->frame_size  = 320;
@@ -105,7 +105,7 @@ static int amr_wb_encode_frame(AVCodecContext *avctx,
 
     if ((s->mode = getWBBitrateMode(avctx->bit_rate)) < 0) {
         av_log(avctx, AV_LOG_ERROR, wb_bitrate_unsupported);
-        return -1;
+        return AVERROR(ENOSYS);
     }
     size = E_IF_encode(s->state, s->mode, data, frame, s->allow_dtx);
     return size;
-- 
1.7.3.1

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to