aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avcodec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-04 15:57:41 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-07 22:34:10 +0200
commit78c9ed26b6e83ea29b55420c2c88dc1860810042 (patch)
tree8bf206d6cd9823055339eea31bae4198d00fb027 /libavcodec/avcodec.c
parent9281dcb8011f52f17379789edf67595fa15f8244 (diff)
downloadffmpeg-78c9ed26b6e83ea29b55420c2c88dc1860810042.tar.gz
avcodec/get_buffer: Use RefStruct API for FramePool
Avoids allocations and frees and error checks for said allocations; also avoids a few indirections and casts. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/avcodec.c')
-rw-r--r--libavcodec/avcodec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index f2dc7b0edd..2dda310e91 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -44,6 +44,7 @@
#include "frame_thread_encoder.h"
#include "hwconfig.h"
#include "internal.h"
+#include "refstruct.h"
#include "thread.h"
/**
@@ -459,7 +460,7 @@ av_cold int avcodec_close(AVCodecContext *avctx)
av_frame_free(&avci->in_frame);
av_frame_free(&avci->recon_frame);
- av_buffer_unref(&avci->pool);
+ ff_refstruct_unref(&avci->pool);
ff_hwaccel_uninit(avctx);