diff mbox series

[FFmpeg-devel,20/23] avutil/hwcontext_vdpau: Don't use AVHWFramesInternal.priv

Message ID DU0P250MB0747B7152DAB08CD9F4380FD8F482@DU0P250MB0747.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit ac86b52f802bd6f54e32ac884b61f4f399211256
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 fail Make fate failed
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
Use AVHWFramesContext.hwctx instead.
This simplifies access to VDPAUFramesContext as one no longer has
to go through AVHWFramesInternal.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavutil/hwcontext_vdpau.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/libavutil/hwcontext_vdpau.c b/libavutil/hwcontext_vdpau.c
index 016300db1e..0a1a33f8b1 100644
--- a/libavutil/hwcontext_vdpau.c
+++ b/libavutil/hwcontext_vdpau.c
@@ -233,7 +233,7 @@  static void vdpau_buffer_free(void *opaque, uint8_t *data)
 static AVBufferRef *vdpau_pool_alloc(void *opaque, size_t size)
 {
     AVHWFramesContext             *ctx = opaque;
-    VDPAUFramesContext           *priv = ctx->internal->priv;
+    VDPAUFramesContext           *priv = ctx->hwctx;
     VDPAUDeviceContext    *device_priv = ctx->device_ctx->hwctx;
     AVVDPAUDeviceContext *device_hwctx = &device_priv->p;
 
@@ -261,7 +261,7 @@  static AVBufferRef *vdpau_pool_alloc(void *opaque, size_t size)
 static int vdpau_frames_init(AVHWFramesContext *ctx)
 {
     VDPAUDeviceContext *device_priv = ctx->device_ctx->hwctx;
-    VDPAUFramesContext        *priv = ctx->internal->priv;
+    VDPAUFramesContext        *priv = ctx->hwctx;
 
     int i;
 
@@ -311,7 +311,7 @@  static int vdpau_transfer_get_formats(AVHWFramesContext *ctx,
                                       enum AVHWFrameTransferDirection dir,
                                       enum AVPixelFormat **formats)
 {
-    VDPAUFramesContext *priv  = ctx->internal->priv;
+    VDPAUFramesContext *priv  = ctx->hwctx;
 
     enum AVPixelFormat *fmts;
 
@@ -334,7 +334,7 @@  static int vdpau_transfer_get_formats(AVHWFramesContext *ctx,
 static int vdpau_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst,
                                     const AVFrame *src)
 {
-    VDPAUFramesContext *priv = ctx->internal->priv;
+    VDPAUFramesContext *priv = ctx->hwctx;
     VdpVideoSurface     surf = (VdpVideoSurface)(uintptr_t)src->data[3];
 
     void *data[3];
@@ -392,7 +392,7 @@  static int vdpau_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst,
 static int vdpau_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
                                   const AVFrame *src)
 {
-    VDPAUFramesContext *priv = ctx->internal->priv;
+    VDPAUFramesContext *priv = ctx->hwctx;
     VdpVideoSurface     surf = (VdpVideoSurface)(uintptr_t)dst->data[3];
 
     const void *data[3];
@@ -514,7 +514,7 @@  const HWContextType ff_hwcontext_type_vdpau = {
     .name                 = "VDPAU",
 
     .device_hwctx_size    = sizeof(VDPAUDeviceContext),
-    .frames_priv_size     = sizeof(VDPAUFramesContext),
+    .frames_hwctx_size    = sizeof(VDPAUFramesContext),
 
 #if HAVE_VDPAU_X11
     .device_create        = vdpau_device_create,