diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-04 04:57:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-04 04:58:13 +0200 |
commit | d5fde13bd226574714d7e30e6442b27f782017a6 (patch) | |
tree | beb8d018b4bea3ffd64c3238e663dd60ea16e527 /libavcodec/huffyuvdec.c | |
parent | 2b9044a6f0b0a6acebf24dbcb988d09c2a30f56f (diff) | |
parent | 6234058148d6e1ee765913b678a22385a87bffac (diff) | |
download | ffmpeg-d5fde13bd226574714d7e30e6442b27f782017a6.tar.gz |
Merge commit '6234058148d6e1ee765913b678a22385a87bffac'
* commit '6234058148d6e1ee765913b678a22385a87bffac':
huffyuv: Return proper error codes
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/huffyuvdec.c')
-rw-r--r-- | libavcodec/huffyuvdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c index b087809dbf..11e2fbfbb8 100644 --- a/libavcodec/huffyuvdec.c +++ b/libavcodec/huffyuvdec.c @@ -105,7 +105,7 @@ static int read_len_table(uint8_t *dst, GetBitContext *gb, int n) repeat = get_bits(gb, 8); if (i + repeat > n || get_bits_left(gb) < 0) { av_log(NULL, AV_LOG_ERROR, "Error reading huffman table\n"); - return -1; + return AVERROR_INVALIDDATA; } while (repeat--) dst[i++] = val; @@ -294,7 +294,7 @@ static av_cold int decode_init(AVCodecContext *avctx) int method, interlace; if (avctx->extradata_size < 4) - return -1; + return AVERROR_INVALIDDATA; method = avctx->extradata[0]; s->decorrelate = method & 64 ? 1 : 0; |