mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-10-19 09:53:18 +00: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>
(cherry picked from commit 3b6ec5abb5
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
00d12cb284
commit
ede4c939e3
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue