[vlc-devel] [PATCH] nvdec: store p_sys as pointer
Alexandre Janniaux
ajanni at videolabs.io
Mon Jul 27 11:37:39 CEST 2020
Fix conversion warnings between unsigned long long and pointers.
---
modules/hw/nvdec/nvdec.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/hw/nvdec/nvdec.c b/modules/hw/nvdec/nvdec.c
index e3aeff2355..345e4cb2ed 100644
--- a/modules/hw/nvdec/nvdec.c
+++ b/modules/hw/nvdec/nvdec.c
@@ -179,7 +179,7 @@ static nvdec_pool_t* nvdec_pool_Create(vlc_video_context *vctx,
goto free_pool;
picture_resource_t res = {
- .p_sys = pool->outputDevicePtr[i],
+ .p_sys = &pool->outputDevicePtr[i],
};
pics[i] = picture_NewFromResource(fmt, &res);
if (!pics[i])
@@ -502,7 +502,7 @@ static int CUDAAPI HandlePictureDisplay(void *p_opaque, CUVIDPARSERDISPINFO *p_d
if (result != VLC_SUCCESS)
goto error;
- picctx->devicePtr = (CUdeviceptr)p_pic->p_sys;
+ picctx->devicePtr = *(CUdeviceptr*)p_pic->p_sys;
picctx->bufferPitch = p_sys->outputPitch;
picctx->bufferHeight = p_sys->decoderHeight;
@@ -1145,4 +1145,3 @@ DecoderContextOpen(vlc_decoder_device *device, vout_window_t *window)
return VLC_SUCCESS;
}
-
--
2.27.0
More information about the vlc-devel
mailing list