speexdec: fix framesize for ultra-wideband
This matches how the libspeex decoder is calculating frame size (except in clamp form). Fixes #11495 Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
64087171f6
commit
c14b837ded
1 changed files with 1 additions and 1 deletions
|
|
@ -1426,7 +1426,7 @@ static int parse_speex_extradata(AVCodecContext *avctx,
|
|||
if (s->frame_size < NB_FRAME_SIZE << (s->mode > 1) ||
|
||||
s->frame_size > INT32_MAX >> (s->mode > 1))
|
||||
return AVERROR_INVALIDDATA;
|
||||
s->frame_size <<= (s->mode > 1);
|
||||
s->frame_size = FFMIN(s->frame_size << (s->mode > 1), NB_FRAME_SIZE << s->mode);
|
||||
s->vbr = bytestream_get_le32(&buf);
|
||||
s->frames_per_packet = bytestream_get_le32(&buf);
|
||||
if (s->frames_per_packet <= 0 ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue