aboutsummaryrefslogtreecommitdiffstats
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
commitfc2a94c15e775d5d7367f1ca71447ca6db689227 (patch)
treedc1dbd8677ecd3c7427269b07839815d0d4a2a87
parente83c1e2d0bedb5d4fa9ab351126b2ecc552f1355 (diff)
downloadffmpeg-fc2a94c15e775d5d7367f1ca71447ca6db689227.tar.gz
bethsoftvideo: return meaningful error codes.
-rw-r--r--libavcodec/bethsoftvideo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c
index 316adb6c79..77bf49cf47 100644
--- a/libavcodec/bethsoftvideo.c
+++ b/libavcodec/bethsoftvideo.c
@@ -75,9 +75,9 @@ static int bethsoftvid_decode_frame(AVCodecContext *avctx,
int code, ret;
int yoffset;
- if (avctx->reget_buffer(avctx, &vid->frame)) {
+ if ((ret = avctx->reget_buffer(avctx, &vid->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
- return -1;
+ return ret;
}
wrap_to_next_line = vid->frame.linesize[0] - avctx->width;
@@ -105,7 +105,7 @@ static int bethsoftvid_decode_frame(AVCodecContext *avctx,
case VIDEO_YOFF_P_FRAME:
yoffset = bytestream2_get_le16(&vid->g);
if(yoffset >= avctx->height)
- return -1;
+ return AVERROR_INVALIDDATA;
dst += vid->frame.linesize[0] * yoffset;
}