[FFmpeg-cvslog] roqaudioenc: return AVERROR codes instead of -1

Justin Ruggles git at videolan.org
Sun Feb 26 05:21:48 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Wed Feb 22 18:33:39 2012 -0500| [f7a2e12f2a050d9c97c63c3d60c04439aa3ef103] | committer: Justin Ruggles

roqaudioenc: return AVERROR codes instead of -1

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f7a2e12f2a050d9c97c63c3d60c04439aa3ef103
---

 libavcodec/roqaudioenc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c
index 6f36965..cebc53c 100644
--- a/libavcodec/roqaudioenc.c
+++ b/libavcodec/roqaudioenc.c
@@ -57,11 +57,11 @@ static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
 
     if (avctx->channels > 2) {
         av_log(avctx, AV_LOG_ERROR, "Audio must be mono or stereo\n");
-        return -1;
+        return AVERROR(EINVAL);
     }
     if (avctx->sample_rate != 22050) {
         av_log(avctx, AV_LOG_ERROR, "Audio must be 22050 Hz\n");
-        return -1;
+        return AVERROR(EINVAL);
     }
 
     avctx->frame_size = ROQ_FRAME_SIZE;



More information about the ffmpeg-cvslog mailing list