1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

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>
This commit is contained in:
Kacper Michajłow
2025-07-03 23:08:23 +02:00
committed by Michael Niedermayer
parent 05094c1749
commit 3b6ec5abb5

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;
}