mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
wmaprodec: check min_samples_per_subframe
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b28c678ba8
commit
9166f483c5
@ -335,6 +335,12 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s->min_samples_per_subframe < (1<<WMAPRO_BLOCK_MIN_BITS)) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "min_samples_per_subframe of %d too small\n",
|
||||||
|
s->min_samples_per_subframe);
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
s->num_channels = avctx->channels;
|
s->num_channels = avctx->channels;
|
||||||
|
|
||||||
if (s->num_channels < 0) {
|
if (s->num_channels < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user