mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 17:32:06 +00:00
avcodec/wavpackenc: Check the number of channels
They are stored in a byte, thus more than 255 is not possible Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
26757b0279
commit
59c915a403
@ -128,6 +128,11 @@ static av_cold int wavpack_encode_init(AVCodecContext *avctx)
|
||||
|
||||
s->avctx = avctx;
|
||||
|
||||
if (avctx->channels > 255) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Too many channels\n", avctx->channels);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
if (!avctx->frame_size) {
|
||||
int block_samples;
|
||||
if (!(avctx->sample_rate & 1))
|
||||
|
Loading…
Reference in New Issue
Block a user