aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avs.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-06 23:48:48 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-06 23:48:48 +0100
commit61904467458b16cf89530e2d0875f3786001dc11 (patch)
treeb87f0d285f00a0f580246dbc0c915d678e1cda49 /libavcodec/avs.c
parenta2aeaff40f34cb54bef55240f9cb8046385087d7 (diff)
parente83c1e2d0bedb5d4fa9ab351126b2ecc552f1355 (diff)
downloadffmpeg-61904467458b16cf89530e2d0875f3786001dc11.tar.gz
Merge commit 'e83c1e2d0bedb5d4fa9ab351126b2ecc552f1355'
* commit 'e83c1e2d0bedb5d4fa9ab351126b2ecc552f1355': avs: return meaningful error codes. aura: return meaningful error codes. asvdec: return meaningful error codes. ansi: return a meaningful error code anm: return meaningful error codes aasc: return meaningful error codes. 8bps: return meaningful error codes. 4xm: operate with pointers to AVFrames instead of whole structs. 4xm: eliminate a pointless indirection Conflicts: libavcodec/4xm.c libavcodec/aasc.c libavcodec/anm.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avs.c')
-rw-r--r--libavcodec/avs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index 39ce7da561..e3d2070bb7 100644
--- a/libavcodec/avs.c
+++ b/libavcodec/avs.c
@@ -54,14 +54,14 @@ avs_decode_frame(AVCodecContext * avctx,
AVFrame *const p = &avs->picture;
const uint8_t *table, *vect;
uint8_t *out;
- int i, j, x, y, stride, vect_w = 3, vect_h = 3;
+ int i, j, x, y, stride, ret, vect_w = 3, vect_h = 3;
AvsVideoSubType sub_type;
AvsBlockType type;
GetBitContext change_map = {0}; //init to silence warning
- if (avctx->reget_buffer(avctx, p)) {
+ if ((ret = avctx->reget_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
- return -1;
+ return ret;
}
p->reference = 3;
p->pict_type = AV_PICTURE_TYPE_P;
@@ -96,7 +96,7 @@ avs_decode_frame(AVCodecContext * avctx,
}
if (type != AVS_VIDEO)
- return -1;
+ return AVERROR_INVALIDDATA;
switch (sub_type) {
case AVS_I_FRAME:
@@ -118,7 +118,7 @@ avs_decode_frame(AVCodecContext * avctx,
break;
default:
- return -1;
+ return AVERROR_INVALIDDATA;
}
if (buf_end - buf < 256 * vect_w * vect_h)