[FFmpeg-cvslog] xan: return a meaningful error code.

Anton Khirnov git at videolan.org
Mon Jan 7 00:03:28 CET 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Nov 16 06:36:15 2012 +0100| [d47dabbac24e1a00ce15079a5d3dc9d5be79e6b2] | committer: Anton Khirnov

xan: return a meaningful error code.

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

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

diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 8c90bb6..14a2d23 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -114,7 +114,7 @@ static int xan_huffman_decode(unsigned char *dest, int dest_len,
     while (val != 0x16) {
         unsigned idx = val - 0x17 + get_bits1(&gb) * byte;
         if (idx >= 2 * byte)
-            return -1;
+            return AVERROR_INVALIDDATA;
         val = src[idx];
 
         if (val < 0x16) {



More information about the ffmpeg-cvslog mailing list