summaryrefslogtreecommitdiff
path: root/libavcodec/c93.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-06 23:59:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-06 23:59:35 +0100
commit7b018e5c8d182b0272477322377b8daafa1c970f (patch)
tree8f526f00d6352279d84ff8c7bcfbb2f78f702bd1 /libavcodec/c93.c
parent61904467458b16cf89530e2d0875f3786001dc11 (diff)
parent84f2847de394ac447f53306bd4dd73e1af6ea5e4 (diff)
downloadffmpeg-7b018e5c8d182b0272477322377b8daafa1c970f.tar.gz
Merge commit '84f2847de394ac447f53306bd4dd73e1af6ea5e4'
* commit '84f2847de394ac447f53306bd4dd73e1af6ea5e4': xl: return a meaningful error code. xan: return a meaningful error code. xxan: return meaningful error codes. zmbv: return more meaningful error codes. yop: use a meaningful error code. c93: return meaningful error codes. bmv: return meaningful error codes. bmp: return meaningful error codes. bink: operate with pointers to AVFrames instead of whole structs. bink: return meaningful error codes. bfi: return meaningful error codes. bethsoftvideo: return meaningful error codes. Conflicts: libavcodec/c93.c libavcodec/xl.c libavcodec/xxan.c libavcodec/yop.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/c93.c')
-rw-r--r--libavcodec/c93.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/c93.c b/libavcodec/c93.c
index 9f3bf8b6cc..e5f371b081 100644
--- a/libavcodec/c93.c
+++ b/libavcodec/c93.c
@@ -134,7 +134,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
newpic->reference = 3;
newpic->buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE |
FF_BUFFER_HINTS_REUSABLE | FF_BUFFER_HINTS_READABLE;
- if ((ret = avctx->reget_buffer(avctx, newpic))) {
+ if ((ret = avctx->reget_buffer(avctx, newpic)) < 0) {
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
return ret;
}
@@ -166,8 +166,8 @@ static int decode_frame(AVCodecContext *avctx, void *data,
switch (block_type) {
case C93_8X8_FROM_PREV:
offset = bytestream2_get_le16(&gb);
- if (copy_block(avctx, out, copy_from, offset, 8, stride))
- return AVERROR_INVALIDDATA;
+ if ((ret = copy_block(avctx, out, copy_from, offset, 8, stride)) < 0)
+ return ret;
break;
case C93_4X4_FROM_CURR:
@@ -176,9 +176,9 @@ static int decode_frame(AVCodecContext *avctx, void *data,
for (j = 0; j < 8; j += 4) {
for (i = 0; i < 8; i += 4) {
offset = bytestream2_get_le16(&gb);
- if (copy_block(avctx, &out[j*stride+i],
- copy_from, offset, 4, stride))
- return AVERROR_INVALIDDATA;
+ if ((ret = copy_block(avctx, &out[j*stride+i],
+ copy_from, offset, 4, stride)) < 0)
+ return ret;
}
}
break;