avutil/hwcontext_internal: Remove unused AVHWFramesInternal.priv

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>
This commit is contained in:
Andreas Rheinhardt 2024-02-11 20:57:32 +01:00 committed by James Almer
parent 51d6bee667
commit a0b9b96269
2 changed files with 0 additions and 15 deletions

View File

@ -241,7 +241,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);
}
@ -261,12 +260,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)
@ -295,8 +288,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);

View File

@ -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;