mirror of https://git.ffmpeg.org/ffmpeg.git
avutil/hwcontext_cuda: Don't use AVHWFramesInternal.priv
Use AVHWFramesContext.hwctx instead. This simplifies accesses to VDPAUFramesContext as one no longer has to go through AVHWFramesInternal. Tested-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
cb92b4bd83
commit
8d277de009
|
@ -130,7 +130,7 @@ static int cuda_frames_init(AVHWFramesContext *ctx)
|
||||||
{
|
{
|
||||||
AVHWDeviceContext *device_ctx = ctx->device_ctx;
|
AVHWDeviceContext *device_ctx = ctx->device_ctx;
|
||||||
AVCUDADeviceContext *hwctx = device_ctx->hwctx;
|
AVCUDADeviceContext *hwctx = device_ctx->hwctx;
|
||||||
CUDAFramesContext *priv = ctx->internal->priv;
|
CUDAFramesContext *priv = ctx->hwctx;
|
||||||
CudaFunctions *cu = hwctx->internal->cuda_dl;
|
CudaFunctions *cu = hwctx->internal->cuda_dl;
|
||||||
int err, i;
|
int err, i;
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ static int cuda_frames_init(AVHWFramesContext *ctx)
|
||||||
|
|
||||||
static int cuda_get_buffer(AVHWFramesContext *ctx, AVFrame *frame)
|
static int cuda_get_buffer(AVHWFramesContext *ctx, AVFrame *frame)
|
||||||
{
|
{
|
||||||
CUDAFramesContext *priv = ctx->internal->priv;
|
CUDAFramesContext *priv = ctx->hwctx;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
frame->buf[0] = av_buffer_pool_get(ctx->pool);
|
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,
|
static int cuda_transfer_data(AVHWFramesContext *ctx, AVFrame *dst,
|
||||||
const AVFrame *src)
|
const AVFrame *src)
|
||||||
{
|
{
|
||||||
CUDAFramesContext *priv = ctx->internal->priv;
|
CUDAFramesContext *priv = ctx->hwctx;
|
||||||
AVHWDeviceContext *device_ctx = ctx->device_ctx;
|
AVHWDeviceContext *device_ctx = ctx->device_ctx;
|
||||||
AVCUDADeviceContext *hwctx = device_ctx->hwctx;
|
AVCUDADeviceContext *hwctx = device_ctx->hwctx;
|
||||||
CudaFunctions *cu = hwctx->internal->cuda_dl;
|
CudaFunctions *cu = hwctx->internal->cuda_dl;
|
||||||
|
@ -563,7 +563,7 @@ const HWContextType ff_hwcontext_type_cuda = {
|
||||||
.name = "CUDA",
|
.name = "CUDA",
|
||||||
|
|
||||||
.device_hwctx_size = sizeof(AVCUDADeviceContext),
|
.device_hwctx_size = sizeof(AVCUDADeviceContext),
|
||||||
.frames_priv_size = sizeof(CUDAFramesContext),
|
.frames_hwctx_size = sizeof(CUDAFramesContext),
|
||||||
|
|
||||||
.device_create = cuda_device_create,
|
.device_create = cuda_device_create,
|
||||||
.device_derive = cuda_device_derive,
|
.device_derive = cuda_device_derive,
|
||||||
|
|
Loading…
Reference in New Issue