diff mbox series

[FFmpeg-devel,22/23] avutil/hwcontext_internal: Remove unused AVHWFramesInternal.priv

Message ID DU0P250MB07471EA0B104545F4B547D188F482@DU0P250MB0747.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel,01/23] avutil/hwcontext_opencl: Use proper OpenCLFramesContext | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 fail Make fate failed

Commit Message

Andreas Rheinhardt Feb. 12, 2024, 12:03 a.m. UTC
It is no longer used by any hwcontext, as they all allocate
their private data together with their public data and access
it via AVHWFramesContext.hwctx.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavutil/hwcontext.c          | 9 ---------
 libavutil/hwcontext_internal.h | 6 ------
 2 files changed, 15 deletions(-)
diff mbox series

Patch

diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
index c962c19f3e..8ecefd2bc4 100644
--- a/libavutil/hwcontext.c
+++ b/libavutil/hwcontext.c
@@ -248,7 +248,6 @@  static void hwframe_ctx_free(void *opaque, uint8_t *data)
     av_buffer_unref(&ctx->device_ref);
 
     av_freep(&ctx->hwctx);
-    av_freep(&ctx->internal->priv);
     av_freep(&ctx->internal);
     av_freep(&ctx);
 }
@@ -268,12 +267,6 @@  AVBufferRef *av_hwframe_ctx_alloc(AVBufferRef *device_ref_in)
     if (!ctx->internal)
         goto fail;
 
-    if (hw_type->frames_priv_size) {
-        ctx->internal->priv = av_mallocz(hw_type->frames_priv_size);
-        if (!ctx->internal->priv)
-            goto fail;
-    }
-
     if (hw_type->frames_hwctx_size) {
         ctx->hwctx = av_mallocz(hw_type->frames_hwctx_size);
         if (!ctx->hwctx)
@@ -302,8 +295,6 @@  AVBufferRef *av_hwframe_ctx_alloc(AVBufferRef *device_ref_in)
 
 fail:
     av_buffer_unref(&device_ref);
-    if (ctx->internal)
-        av_freep(&ctx->internal->priv);
     av_freep(&ctx->internal);
     av_freep(&ctx->hwctx);
     av_freep(&ctx);
diff --git a/libavutil/hwcontext_internal.h b/libavutil/hwcontext_internal.h
index 3745867283..1476def1d7 100644
--- a/libavutil/hwcontext_internal.h
+++ b/libavutil/hwcontext_internal.h
@@ -53,11 +53,6 @@  typedef struct HWContextType {
      * i.e. AVHWFramesContext.hwctx
      */
     size_t             frames_hwctx_size;
-    /**
-     * size of the private data, i.e.
-     * AVHWFramesInternal.priv
-     */
-    size_t             frames_priv_size;
 
     int              (*device_create)(AVHWDeviceContext *ctx, const char *device,
                                       AVDictionary *opts, int flags);
@@ -97,7 +92,6 @@  typedef struct HWContextType {
 
 struct AVHWFramesInternal {
     const HWContextType *hw_type;
-    void                *priv;
 
     AVBufferPool *pool_internal;