xan: return a meaningful error code.
authorAnton Khirnov <anton@khirnov.net>
Fri, 16 Nov 2012 05:36:15 +0000 (06:36 +0100)
committerAnton Khirnov <anton@khirnov.net>
Sun, 6 Jan 2013 12:31:40 +0000 (13:31 +0100)
libavcodec/xan.c

index 8c90bb6..14a2d23 100644 (file)
@@ -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) {