diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-13 12:19:15 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-13 12:19:15 +0400 |
commit | d3850ac5b9c7e0f6cd77d652a3a8985c6ca6732a (patch) | |
tree | 6352a7805767fb3286f8d1d00c5419ad70479909 /libavcodec/indeo4.c | |
parent | 0c7bd340230635676507dbca998d04878c0117da (diff) | |
parent | 0cb83c563848bf8f8365e7bd30e7e6b57ef360f0 (diff) |
Merge commit '0cb83c563848bf8f8365e7bd30e7e6b57ef360f0'
* commit '0cb83c563848bf8f8365e7bd30e7e6b57ef360f0':
indeo4: Check the block size if reusing the band configuration
Conflicts:
libavcodec/indeo4.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/indeo4.c')
-rw-r--r-- | libavcodec/indeo4.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c index 65aa4f5c40..0774f82ce5 100644 --- a/libavcodec/indeo4.c +++ b/libavcodec/indeo4.c @@ -295,6 +295,7 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band, band->is_empty = get_bits1(&ctx->gb); if (!band->is_empty) { + int old_blk_size = band->blk_size; /* skip header size * If header size is not given, header size is 4 bytes. */ if (get_bits1(&ctx->gb)) @@ -393,6 +394,13 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band, return AVERROR_INVALIDDATA; } band->quant_mat = quant_mat; + } else { + if (old_blk_size != band->blk_size) { + av_log(avctx, AV_LOG_ERROR, + "The band block size does not match the configuration " + "inherited\n"); + return AVERROR_INVALIDDATA; + } } if (quant_index_to_tab[band->quant_mat] > 4 && band->blk_size == 4) { av_log(avctx, AV_LOG_ERROR, "Invalid quant matrix for 4x4 block encountered!\n"); |