diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-04 16:21:03 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-10-07 22:35:22 +0200 |
commit | f8252d6ce3ff7f306f7f7689c8c1c0c02126c70d (patch) | |
tree | e37bed3b2eea908606c9950c631bb988708b4a73 /libavcodec/h264dec.h | |
parent | 3ba4f9c21e8bd78386738324d8767d74d75eec53 (diff) | |
download | ffmpeg-f8252d6ce3ff7f306f7f7689c8c1c0c02126c70d.tar.gz |
avcodec/decode: Use RefStruct API for hwaccel_picture_private
Avoids allocations and therefore error checks: Syncing
hwaccel_picture_private across threads can't fail any more.
Also gets rid of an unnecessary pointer in structures and
in the parameter list of ff_hwaccel_frame_priv_alloc().
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Reviewed-by: Lynne <dev@lynne.ee>
Tested-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/h264dec.h')
-rw-r--r-- | libavcodec/h264dec.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index 513856749a..b4ea0ed880 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -117,8 +117,8 @@ typedef struct H264Picture { AVBufferRef *mb_type_buf; uint32_t *mb_type; - AVBufferRef *hwaccel_priv_buf; - void *hwaccel_picture_private; ///< hardware accelerator private data + /// RefStruct reference for hardware accelerator private data + void *hwaccel_picture_private; AVBufferRef *ref_index_buf[2]; int8_t *ref_index[2]; |