summaryrefslogtreecommitdiff
path: root/libavcodec/xan.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-11-16 06:36:15 +0100
committerAnton Khirnov <anton@khirnov.net>2013-01-06 13:31:40 +0100
commitd47dabbac24e1a00ce15079a5d3dc9d5be79e6b2 (patch)
tree169160f93aa2937caacf8933a8090de21b70b463 /libavcodec/xan.c
parent4aebb8d999f0a5005081c50211be3d3c7474d330 (diff)
xan: return a meaningful error code.
Diffstat (limited to 'libavcodec/xan.c')
-rw-r--r--libavcodec/xan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 8c90bb6ab0..14a2d23f49 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) {