avcodec/opus: don't materialize buf pointer from null

Fixes: avcodec/opus/dec.c: runtime error: applying non-zero offset 10 to null pointer

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3b6ec5abb5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Kacper Michajłow 2025-07-03 23:08:23 +02:00 committed by Michael Niedermayer
parent 00d12cb284
commit ede4c939e3
No known key found for this signature in database
GPG key ID: B18E8928B3948D64

View file

@ -585,6 +585,9 @@ static int opus_decode_packet(AVCodecContext *avctx, AVFrame *frame,
s->decoded_samples = ret;
decoded_samples = FFMIN(decoded_samples, ret);
if (!buf)
continue;
buf += s->packet.packet_size;
buf_size -= s->packet.packet_size;
}