mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
wavpack: check number of channels
This means container and codec disagree. The codec is supposed to know better so this could be an error instead.
This commit is contained in:
parent
350dd85345
commit
a59f85d106
@ -906,7 +906,10 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
|
||||
chmask = bytestream2_get_le32(&gb);
|
||||
break;
|
||||
case 5:
|
||||
bytestream2_skip(&gb, 1);
|
||||
size = bytestream2_get_byte(&gb);
|
||||
if (avctx->channels != size)
|
||||
av_log(avctx, AV_LOG_WARNING, "%i channels signalled"
|
||||
" instead of %i.\n", size, avctx->channels);
|
||||
chan |= (bytestream2_get_byte(&gb) & 0xF) << 8;
|
||||
chmask = bytestream2_get_le16(&gb);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user