Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-10-13 12:05:42 +0400
committerPaul B Mahol <onemda@gmail.com>2012-10-13 12:07:41 +0400
commit92b3d8bc53377f106eae71c69240942550a230a1 (patch)
tree0157301acca4573fd8b8a1db83bab12f441b3620 /libavcodec/bethsoftvideo.c
parentefb0e4e7afc633467b83786819262cb15eda2df6 (diff)
bethsoftvideo: return meaningfull error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/bethsoftvideo.c')
-rw-r--r--libavcodec/bethsoftvideo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c
index 427d83c453..8eec5b7253 100644
--- a/libavcodec/bethsoftvideo.c
+++ b/libavcodec/bethsoftvideo.c
@@ -77,9 +77,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;
@@ -107,7 +107,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;
}