diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-10-11 10:02:51 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-11-07 17:26:09 +0100 |
commit | e3533006225d35107c29f984ef4c4bbd9eefeb1c (patch) | |
tree | b615124dd047243161c0a1b96da09c2a307c1ccd /libavcodec | |
parent | ffdda740fe7983240b31bee3e058e43a859851a4 (diff) | |
download | ffmpeg-e3533006225d35107c29f984ef4c4bbd9eefeb1c.tar.gz |
avcodec/binkaudio: Use AVCodecInternal.in_pkt for buffer packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/binkaudio.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index 59ecab25c6..f808141ba5 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -140,9 +140,7 @@ static av_cold int decode_init(AVCodecContext *avctx) if (ret < 0) return ret; - s->pkt = av_packet_alloc(); - if (!s->pkt) - return AVERROR(ENOMEM); + s->pkt = avctx->internal->in_pkt; return 0; } @@ -277,8 +275,6 @@ static av_cold int decode_end(AVCodecContext *avctx) else if (CONFIG_BINKAUDIO_DCT_DECODER) ff_dct_end(&s->trans.dct); - av_packet_free(&s->pkt); - return 0; } @@ -341,7 +337,8 @@ static void decode_flush(AVCodecContext *avctx) { BinkAudioContext *const s = avctx->priv_data; - av_packet_unref(s->pkt); + /* s->pkt coincides with avctx->internal->in_pkt + * and is unreferenced generically when flushing. */ s->first = 1; } |