diff mbox series

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

Message ID DU0P250MB0747F448AC5E29DF4A0B9C778F482@DU0P250MB0747.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 8d277de009c177fd7aeb3d3b1752bfbf361a9b89
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 accesses to VDPAUFramesContext as one no longer has
to go through AVHWFramesInternal.

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

Patch

diff --git a/libavutil/hwcontext_cuda.c b/libavutil/hwcontext_cuda.c
index 0312d3b9d7..1c61b36d69 100644
--- a/libavutil/hwcontext_cuda.c
+++ b/libavutil/hwcontext_cuda.c
@@ -130,7 +130,7 @@  static int cuda_frames_init(AVHWFramesContext *ctx)
 {
     AVHWDeviceContext *device_ctx = ctx->device_ctx;
     AVCUDADeviceContext    *hwctx = device_ctx->hwctx;
-    CUDAFramesContext       *priv = ctx->internal->priv;
+    CUDAFramesContext       *priv = ctx->hwctx;
     CudaFunctions             *cu = hwctx->internal->cuda_dl;
     int err, i;
 
@@ -175,7 +175,7 @@  static int cuda_frames_init(AVHWFramesContext *ctx)
 
 static int cuda_get_buffer(AVHWFramesContext *ctx, AVFrame *frame)
 {
-    CUDAFramesContext *priv = ctx->internal->priv;
+    CUDAFramesContext *priv = ctx->hwctx;
     int res;
 
     frame->buf[0] = av_buffer_pool_get(ctx->pool);
@@ -223,7 +223,7 @@  static int cuda_transfer_get_formats(AVHWFramesContext *ctx,
 static int cuda_transfer_data(AVHWFramesContext *ctx, AVFrame *dst,
                                  const AVFrame *src)
 {
-    CUDAFramesContext       *priv = ctx->internal->priv;
+    CUDAFramesContext       *priv = ctx->hwctx;
     AVHWDeviceContext *device_ctx = ctx->device_ctx;
     AVCUDADeviceContext    *hwctx = device_ctx->hwctx;
     CudaFunctions             *cu = hwctx->internal->cuda_dl;
@@ -563,7 +563,7 @@  const HWContextType ff_hwcontext_type_cuda = {
     .name                 = "CUDA",
 
     .device_hwctx_size    = sizeof(AVCUDADeviceContext),
-    .frames_priv_size     = sizeof(CUDAFramesContext),
+    .frames_hwctx_size    = sizeof(CUDAFramesContext),
 
     .device_create        = cuda_device_create,
     .device_derive        = cuda_device_derive,