summaryrefslogtreecommitdiffstats
path: root/libavcodec/aic.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-17 20:53:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-17 20:53:34 +0200
commit98b95e746668a67250baa5533d61dda7aa26bff5 (patch)
treef7107979c74fbf12764d2b88053ad7f2ab2edab8 /libavcodec/aic.c
parent4624656797b667eb6405186682eb04e74dfd90fd (diff)
parentd8d124eebcf2ec1f6a1936b12a4f00a48f08e85c (diff)
downloadffmpeg-streaming-98b95e746668a67250baa5533d61dda7aa26bff5.zip
ffmpeg-streaming-98b95e746668a67250baa5533d61dda7aa26bff5.tar.gz
Merge commit 'd8d124eebcf2ec1f6a1936b12a4f00a48f08e85c'
* commit 'd8d124eebcf2ec1f6a1936b12a4f00a48f08e85c': aic: Improve error reporting Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aic.c')
-rw-r--r--libavcodec/aic.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/libavcodec/aic.c b/libavcodec/aic.c
index 648ccba..c747bb0 100644
--- a/libavcodec/aic.c
+++ b/libavcodec/aic.c
@@ -387,8 +387,11 @@ static int aic_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
return AVERROR_INVALIDDATA;
}
- if ((ret = aic_decode_header(ctx, buf, buf_size)) < 0)
+ ret = aic_decode_header(ctx, buf, buf_size);
+ if (ret < 0) {
+ av_log(avctx, AV_LOG_ERROR, "Invalid header\n");
return ret;
+ }
if ((ret = ff_get_buffer(avctx, ctx->frame, 0)) < 0)
return ret;
@@ -400,13 +403,17 @@ static int aic_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
for (x = 0; x < ctx->mb_width; x += ctx->slice_width) {
slice_size = bytestream2_get_le16(&gb) * 4;
if (slice_size + off > buf_size || !slice_size) {
- av_log(avctx, AV_LOG_ERROR, "Incorrect slice size\n");
+ av_log(avctx, AV_LOG_ERROR,
+ "Incorrect slice size %d at %d.%d\n", slice_size, x, y);
return AVERROR_INVALIDDATA;
}
- if ((ret = aic_decode_slice(ctx, x, y,
- buf + off, slice_size)) < 0)
+ ret = aic_decode_slice(ctx, x, y, buf + off, slice_size);
+ if (ret < 0) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Error decoding slice at %d.%d\n", x, y);
return ret;
+ }
off += slice_size;
}
OpenPOWER on IntegriCloud