diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-14 14:36:17 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-14 14:43:32 +0100 |
commit | 329675cfd71fab29e47ea9c64f3560f0305dbf36 (patch) | |
tree | 45b4e04ad5d38aa6bbb14cb9d75729d40db2abfd /libavcodec/cscd.c | |
parent | a646ac8ef5c51d6a47eb564d58d04564c0489871 (diff) | |
parent | a1c525f7eb0783d31ba7a653865b6cbd3dc880de (diff) | |
download | ffmpeg-329675cfd71fab29e47ea9c64f3560f0305dbf36.tar.gz |
Merge commit 'a1c525f7eb0783d31ba7a653865b6cbd3dc880de'
* commit 'a1c525f7eb0783d31ba7a653865b6cbd3dc880de':
pcx: return meaningful error codes.
tmv: return meaningful error codes.
msrle: return meaningful error codes.
cscd: return meaningful error codes.
yadif: x86: fix build for compilers without aligned stack
lavc: introduce the convenience function init_get_bits8
lavc: check for overflow in init_get_bits
Conflicts:
libavcodec/cscd.c
libavcodec/pcx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cscd.c')
-rw-r--r-- | libavcodec/cscd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c index e7ebb37f58..110b06fa2b 100644 --- a/libavcodec/cscd.c +++ b/libavcodec/cscd.c @@ -68,18 +68,19 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, int buf_size = avpkt->size; CamStudioContext *c = avctx->priv_data; AVFrame *picture = data; + int ret; if (buf_size < 2) { av_log(avctx, AV_LOG_ERROR, "coded frame too small\n"); - return -1; + return AVERROR_INVALIDDATA; } c->pic.reference = 3; c->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_READABLE | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; - if (avctx->reget_buffer(avctx, &c->pic) < 0) { + if ((ret = avctx->reget_buffer(avctx, &c->pic)) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); - return -1; + return ret; } // decompress data @@ -98,12 +99,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, break; #else av_log(avctx, AV_LOG_ERROR, "compiled without zlib support\n"); - return -1; + return AVERROR(ENOSYS); #endif } default: av_log(avctx, AV_LOG_ERROR, "unknown compression\n"); - return -1; + return AVERROR_INVALIDDATA; } // flip upside down, add difference frame |