summaryrefslogtreecommitdiff
path: root/libavcodec/decode.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-04 16:21:03 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-07 22:35:22 +0200
commitf8252d6ce3ff7f306f7f7689c8c1c0c02126c70d (patch)
treee37bed3b2eea908606c9950c631bb988708b4a73 /libavcodec/decode.h
parent3ba4f9c21e8bd78386738324d8767d74d75eec53 (diff)
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/decode.h')
-rw-r--r--libavcodec/decode.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/libavcodec/decode.h b/libavcodec/decode.h
index be03c136e7..daf1a67444 100644
--- a/libavcodec/decode.h
+++ b/libavcodec/decode.h
@@ -21,7 +21,6 @@
#ifndef AVCODEC_DECODE_H
#define AVCODEC_DECODE_H
-#include "libavutil/buffer.h"
#include "libavutil/frame.h"
#include "libavutil/hwcontext.h"
@@ -141,17 +140,14 @@ int ff_side_data_update_matrix_encoding(AVFrame *frame,
/**
* Allocate a hwaccel frame private data if the provided avctx
- * uses a hwaccel method that needs it. The private data will
- * be refcounted via the AVBuffer API (if allocated).
+ * uses a hwaccel method that needs it. The returned data is
+ * a RefStruct reference (if allocated).
*
* @param avctx The codec context
* @param hwaccel_picture_private Pointer to return hwaccel_picture_private
- * @param hwaccel_priv_buf Pointer to return the AVBufferRef owning
- * hwaccel_picture_private
* @return 0 on success, < 0 on error
*/
-int ff_hwaccel_frame_priv_alloc(AVCodecContext *avctx, void **hwaccel_picture_private,
- AVBufferRef **hwaccel_priv_buf);
+int ff_hwaccel_frame_priv_alloc(AVCodecContext *avctx, void **hwaccel_picture_private);
/**
* Get side data of the given type from a decoding context.