diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-04 15:57:41 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-10-07 22:34:10 +0200 |
commit | 78c9ed26b6e83ea29b55420c2c88dc1860810042 (patch) | |
tree | 8bf206d6cd9823055339eea31bae4198d00fb027 /libavcodec/avcodec.c | |
parent | 9281dcb8011f52f17379789edf67595fa15f8244 (diff) | |
download | ffmpeg-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.c | 3 |
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); |