[FFmpeg-cvslog] libavcodec/ac3dec.c: Avoid unspecific -1 error code

Michael Niedermayer git at videolan.org
Wed Jan 2 01:23:53 EET 2019


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Dec 31 18:40:34 2018 +0100| [8e1b5ba53839dca3951f9760b390456436ef96d1] | committer: Michael Niedermayer

libavcodec/ac3dec.c: Avoid unspecific -1 error code

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/ac3dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 71419458fa..ba731314b4 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -452,7 +452,7 @@ static int decode_exponents(AC3DecodeContext *s,
         prevexp += dexp[i] - 2;
         if (prevexp > 24U) {
             av_log(s->avctx, AV_LOG_ERROR, "exponent %d is out-of-range\n", prevexp);
-            return -1;
+            return AVERROR_INVALIDDATA;
         }
         switch (group_size) {
         case 4: dexps[j++] = prevexp;



More information about the ffmpeg-cvslog mailing list