aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-11-14 16:09:39 +0100
committerAnton Khirnov <anton@khirnov.net>2013-01-06 13:31:39 +0100
commite83c1e2d0bedb5d4fa9ab351126b2ecc552f1355 (patch)
tree0cfacda1c9b6e0d4bada7b792a6723aedc853d7f /libavcodec
parent620faee5d1069a29c2c73aeed1e8485f21565b34 (diff)
downloadffmpeg-e83c1e2d0bedb5d4fa9ab351126b2ecc552f1355.tar.gz
avs: return meaningful error codes.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index 98a53f20bc..71b8b0c283 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;
- 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 = 1;
p->pict_type = AV_PICTURE_TYPE_P;
@@ -94,7 +94,7 @@ avs_decode_frame(AVCodecContext * avctx,
}
if (type != AVS_VIDEO)
- return -1;
+ return AVERROR_INVALIDDATA;
switch (sub_type) {
case AVS_I_FRAME:
@@ -116,7 +116,7 @@ avs_decode_frame(AVCodecContext * avctx,
break;
default:
- return -1;
+ return AVERROR_INVALIDDATA;
}
if (buf_end - buf < 256 * vect_w * vect_h)