[FFmpeg-cvslog] bethsoftvideo: return meaningful error codes.
Anton Khirnov
git at videolan.org
Mon Jan 7 00:03:26 CET 2013
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Nov 14 16:09:39 2012 +0100| [fc2a94c15e775d5d7367f1ca71447ca6db689227] | committer: Anton Khirnov
bethsoftvideo: return meaningful error codes.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fc2a94c15e775d5d7367f1ca71447ca6db689227
---
libavcodec/bethsoftvideo.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c
index 316adb6..77bf49c 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;
}
More information about the ffmpeg-cvslog
mailing list