Merge commit '7388c0c58601477db076e2e74e8b11f8a644384a'

* commit '7388c0c58601477db076e2e74e8b11f8a644384a':
  indeo: Properly forward the error codes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-07-01 11:31:16 +02:00
commit 43229d609a
1 changed files with 10 additions and 2 deletions

View File

@ -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;
}