aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qsv_internal.h
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/qsv_internal.h
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/qsv_internal.h')
-rw-r--r--libavcodec/qsv_internal.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h
index c2d301b4a2..d970cd20f0 100644
--- a/libavcodec/qsv_internal.h
+++ b/libavcodec/qsv_internal.h
@@ -115,11 +115,12 @@ typedef struct QSVFramesContext {
AVBufferRef *hw_frames_ctx;
void *logctx;
- /* The memory ids for the external frames.
- * Refcounted, since we need one reference owned by the QSVFramesContext
- * (i.e. by the encoder/decoder) and another one given to the MFX session
- * from the frame allocator. */
- AVBufferRef *mids_buf;
+ /**
+ * The memory ids for the external frames.
+ * Refcounted (via the RefStruct API), since we need one reference
+ * owned by the QSVFramesContext (i.e. by the encoder/decoder) and
+ * another one given to the MFX session from the frame allocator.
+ */
QSVMid *mids;
int nb_mids;
} QSVFramesContext;