From 0c7af7b95484167c89ec0cb1bd6a862ecaf70e36 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 7 Feb 2023 16:26:40 +0100 Subject: [PATCH] avcodec/bonk: properly handle some other errors --- libavcodec/bonk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/bonk.c b/libavcodec/bonk.c index 061cc69a58..5f510e4910 100644 --- a/libavcodec/bonk.c +++ b/libavcodec/bonk.c @@ -330,10 +330,10 @@ static int bonk_decode(AVCodecContext *avctx, AVFrame *frame, frame->nb_samples = FFMIN(s->samples_per_packet * s->down_sampling, s->nb_samples); if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) - return ret; + goto fail; if ((ret = init_get_bits8(gb, buf, buf_size)) < 0) - return ret; + goto fail; skip_bits(gb, s->skip); if ((ret = intlist_read(s, s->k, s->n_taps, 0)) < 0)