mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-25 11:22:44 +08:00
indeo4: Check the block size if reusing the band configuration
Sample-Id: 00000287-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 0cb83c5638)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
committed by
Reinhard Tartler
parent
2656036757
commit
0358a099f8
@@ -294,6 +294,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))
|
||||
@@ -379,6 +380,13 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band,
|
||||
band->quant_mat);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
||||
/* decode block huffman codebook */
|
||||
|
||||
Reference in New Issue
Block a user