avutil/hwcontext: Remove unused AVHWDeviceInternal.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 AVHWDeviceContext.hwctx. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
committed by
James Almer
parent
51f0405450
commit
060277136d
@@ -139,7 +139,6 @@ static void hwdevice_ctx_free(void *opaque, uint8_t *data)
|
|||||||
av_buffer_unref(&ctx->internal->source_device);
|
av_buffer_unref(&ctx->internal->source_device);
|
||||||
|
|
||||||
av_freep(&ctx->hwctx);
|
av_freep(&ctx->hwctx);
|
||||||
av_freep(&ctx->internal->priv);
|
|
||||||
av_freep(&ctx->internal);
|
av_freep(&ctx->internal);
|
||||||
av_freep(&ctx);
|
av_freep(&ctx);
|
||||||
}
|
}
|
||||||
@@ -168,12 +167,6 @@ AVBufferRef *av_hwdevice_ctx_alloc(enum AVHWDeviceType type)
|
|||||||
if (!ctx->internal)
|
if (!ctx->internal)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (hw_type->device_priv_size) {
|
|
||||||
ctx->internal->priv = av_mallocz(hw_type->device_priv_size);
|
|
||||||
if (!ctx->internal->priv)
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hw_type->device_hwctx_size) {
|
if (hw_type->device_hwctx_size) {
|
||||||
ctx->hwctx = av_mallocz(hw_type->device_hwctx_size);
|
ctx->hwctx = av_mallocz(hw_type->device_hwctx_size);
|
||||||
if (!ctx->hwctx)
|
if (!ctx->hwctx)
|
||||||
@@ -194,8 +187,6 @@ AVBufferRef *av_hwdevice_ctx_alloc(enum AVHWDeviceType type)
|
|||||||
return buf;
|
return buf;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
if (ctx->internal)
|
|
||||||
av_freep(&ctx->internal->priv);
|
|
||||||
av_freep(&ctx->internal);
|
av_freep(&ctx->internal);
|
||||||
av_freep(&ctx->hwctx);
|
av_freep(&ctx->hwctx);
|
||||||
av_freep(&ctx);
|
av_freep(&ctx);
|
||||||
|
|||||||
@@ -41,11 +41,6 @@ typedef struct HWContextType {
|
|||||||
* i.e. AVHWDeviceContext.hwctx
|
* i.e. AVHWDeviceContext.hwctx
|
||||||
*/
|
*/
|
||||||
size_t device_hwctx_size;
|
size_t device_hwctx_size;
|
||||||
/**
|
|
||||||
* size of the private data, i.e.
|
|
||||||
* AVHWDeviceInternal.priv
|
|
||||||
*/
|
|
||||||
size_t device_priv_size;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Size of the hardware-specific device configuration.
|
* Size of the hardware-specific device configuration.
|
||||||
@@ -102,7 +97,6 @@ typedef struct HWContextType {
|
|||||||
|
|
||||||
struct AVHWDeviceInternal {
|
struct AVHWDeviceInternal {
|
||||||
const HWContextType *hw_type;
|
const HWContextType *hw_type;
|
||||||
void *priv;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For a derived device, a reference to the original device
|
* For a derived device, a reference to the original device
|
||||||
|
|||||||
Reference in New Issue
Block a user