Correction: this fix the sample from #11054 but not #11078. Still trying to figure out why.
> On Jan 28, 2025, at 8:21 PM, shenleban tongying <shenlebantongy...@gmail.com> > wrote: > > The max frame_size for speex format is 32000 Hz * 20 ms / 1000 ms = 640 > > close #11054 and #11078 > > Signed-off-by: shenleban tongying <shenlebantongy...@gmail.com> > --- > libavcodec/speexdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/speexdec.c b/libavcodec/speexdec.c > index d25823ef6e..555012a343 100644 > --- a/libavcodec/speexdec.c > +++ b/libavcodec/speexdec.c > @@ -1425,7 +1425,7 @@ static int parse_speex_extradata(AVCodecContext *avctx, > if (s->frame_size < NB_FRAME_SIZE << (s->mode > 0) || > s->frame_size > INT32_MAX >> (s->mode > 0)) > return AVERROR_INVALIDDATA; > - s->frame_size <<= (s->mode > 0); > + s->frame_size = FFMIN(640, s->frame_size << (s->mode > 0)); > s->vbr = bytestream_get_le32(&buf); > s->frames_per_packet = bytestream_get_le32(&buf); > if (s->frames_per_packet <= 0 || > -- > 2.48.1 > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".