summaryrefslogtreecommitdiff
path: root/libavcodec/ivi_common.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-01 11:31:16 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-01 11:31:25 +0200
commit43229d609a1796cce3537932539439529b134b9b (patch)
treed04fcbc38baeb6e1e19b38fb82abc744aa9eff20 /libavcodec/ivi_common.c
parent16fd75ceec1d3915b565469d796ac4a273813bfe (diff)
parent7388c0c58601477db076e2e74e8b11f8a644384a (diff)
downloadffmpeg-43229d609a1796cce3537932539439529b134b9b.tar.gz
Merge commit '7388c0c58601477db076e2e74e8b11f8a644384a'
* commit '7388c0c58601477db076e2e74e8b11f8a644384a': indeo: Properly forward the error codes Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ivi_common.c')
-rw-r--r--libavcodec/ivi_common.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 53a2d2b1f0..0be9baae40 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -808,8 +808,16 @@ static int decode_band(IVI45DecContext *ctx,
break;
result = ivi_decode_blocks(&ctx->gb, band, tile, avctx);
- if (result < 0 || ((get_bits_count(&ctx->gb) - pos) >> 3) != tile->data_size) {
- av_log(avctx, AV_LOG_ERROR, "Corrupted tile data encountered!\n");
+ if (result < 0) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Corrupted tile data encountered!\n");
+ break;
+ }
+
+ if (((get_bits_count(&ctx->gb) - pos) >> 3) != tile->data_size) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Tile data_size mismatch!\n");
+ result = AVERROR_INVALIDDATA;
break;
}