diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-26 01:11:37 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-04-19 13:18:04 +0200 |
commit | f18de5bc4a5721d630449c6dae4bbeebe36d2a82 (patch) | |
tree | 1db4a6e033fc4e2a760ada1967d8cd9819f9432e /libavcodec/v4l2_buffers.h | |
parent | fbd1b90b2944363703b82e7e674e4f09bc45ca1e (diff) | |
download | ffmpeg-f18de5bc4a5721d630449c6dae4bbeebe36d2a82.tar.gz |
avcodec/v4l2_(m2m|buffers): Use RefStruct API for context references
Avoids allocations and therefore error checks; also avoids
indirections and allows to remove the boilerplate code
for creating an object with a dedicated free function.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/v4l2_buffers.h')
-rw-r--r-- | libavcodec/v4l2_buffers.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/v4l2_buffers.h b/libavcodec/v4l2_buffers.h index 3d2ff1b9a5..e35b161309 100644 --- a/libavcodec/v4l2_buffers.h +++ b/libavcodec/v4l2_buffers.h @@ -28,7 +28,6 @@ #include <stddef.h> #include <linux/videodev2.h> -#include "libavutil/buffer.h" #include "libavutil/frame.h" #include "packet.h" @@ -46,8 +45,9 @@ typedef struct V4L2Buffer { struct V4L2Context *context; /* This object is refcounted per-plane, so we need to keep track - * of how many context-refs we are holding. */ - AVBufferRef *context_ref; + * of how many context-refs we are holding. + * This pointer is a RefStruct reference. */ + const struct V4L2m2mContext *context_ref; atomic_uint context_refcount; /* keep track of the mmap address and mmap length */ |