diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-07 01:24:32 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-07 01:24:32 +0100 |
commit | 501db2f32babff8e2851ffd7aeb6bcb1ecb47d19 (patch) | |
tree | a911a0ca4813975ecc9baae4182b3fea8ef45944 /libavcodec/vb.c | |
parent | 4b20d307b32b3562b7cd595cd00dae30203a51fc (diff) | |
parent | 9dbbda235d93d628777b986e502213f1ed390973 (diff) | |
download | ffmpeg-501db2f32babff8e2851ffd7aeb6bcb1ecb47d19.tar.gz |
Merge commit '9dbbda235d93d628777b986e502213f1ed390973'
* commit '9dbbda235d93d628777b986e502213f1ed390973':
vb: return meaningful error codes.
ptx: return meaningful error codes.
tiff: return meaningful error codes.
vqavideo: return meaningful error codes.
mss2: return meaningful error codes.
v210dec: return meaningful error codes
indeo2: cosmetics, reformat
Conflicts:
libavcodec/indeo2.c
libavcodec/tiff.c
libavcodec/v210dec.c
libavcodec/vb.c
libavcodec/vqavideo.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vb.c')
-rw-r--r-- | libavcodec/vb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/vb.c b/libavcodec/vb.c index 11225869f1..2b57e7968f 100644 --- a/libavcodec/vb.c +++ b/libavcodec/vb.c @@ -123,7 +123,7 @@ static int vb_decode_framedata(VBDecContext *c, int offset) if(!t){ //raw block if (bytestream2_get_bytes_left(&g) < 16) { av_log(c->avctx, AV_LOG_ERROR, "Insufficient data\n"); - return -1; + return AVERROR_INVALIDDATA; } for(y = 0; y < 4; y++) bytestream2_get_buffer(&g, cur + y * width, 4); @@ -168,7 +168,7 @@ static int vb_decode_framedata(VBDecContext *c, int offset) break; case 3: av_log(c->avctx, AV_LOG_ERROR, "Invalid opcode seen @%d\n",blk); - return -1; + return AVERROR_INVALIDDATA; } break; } @@ -190,7 +190,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, { VBDecContext * const c = avctx->priv_data; uint8_t *outptr, *srcptr; - int i, j; + int i, j, ret; int flags; uint32_t size; int offset = 0; @@ -200,9 +200,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, if(c->pic.data[0]) avctx->release_buffer(avctx, &c->pic); c->pic.reference = 3; - if(ff_get_buffer(avctx, &c->pic) < 0){ + if ((ret = ff_get_buffer(avctx, &c->pic)) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); - return -1; + return ret; } flags = bytestream2_get_le16(&c->stream); |