aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qsvenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-24 12:49:58 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-04-19 13:18:04 +0200
commitd692c429380ff254ea449ef62b07fb0542109200 (patch)
tree054b5408c3b903e47f4d586be5647b10a4ae58b8 /libavcodec/qsvenc.c
parentac8288e2882a2cb5395dcee7ee19e56ad1a678e4 (diff)
downloadffmpeg-d692c429380ff254ea449ef62b07fb0542109200.tar.gz
avcodec/qsv: Use RefStruct API for memory id (mids) array
Avoids allocations and therefore error checks and cleanup code; also avoids indirections. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/qsvenc.c')
-rw-r--r--libavcodec/qsvenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 3a8607fca6..018d193495 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -41,6 +41,7 @@
#include "qsv.h"
#include "qsv_internal.h"
#include "qsvenc.h"
+#include "refstruct.h"
struct profile_names {
mfxU16 profile;
@@ -2649,7 +2650,7 @@ int ff_qsv_enc_close(AVCodecContext *avctx, QSVEncContext *q)
ff_qsv_close_internal_session(&q->internal_qs);
av_buffer_unref(&q->frames_ctx.hw_frames_ctx);
- av_buffer_unref(&q->frames_ctx.mids_buf);
+ ff_refstruct_unref(&q->frames_ctx.mids);
cur = q->work_frames;
while (cur) {