[vlc-devel] [PATCH 1/6] nvdec: store pointer instead of index
Quentin Chateau
quentin.chateau at deepskycorp.com
Fri Apr 3 10:03:30 CEST 2020
In case this went unnoticed: this patchset is an updated version of what
I submitted 2 weeks ago, with the changes you asked for during your
first review.
On 30/03/2020 11:26, quentin.chateau at deepskycorp.com wrote:
> From: Quentin Chateau <quentin.chateau at deepskycorp.com>
>
> ---
> 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 bfe7c4e30a..26f19e8a52 100644
> --- a/modules/hw/nvdec/nvdec.c
> +++ b/modules/hw/nvdec/nvdec.c
> @@ -266,7 +266,7 @@ static int CUDAAPI HandleVideoSequence(void *p_opaque, CUVIDEOFORMAT *p_format)
> if (ret != VLC_SUCCESS || p_sys->outputDevicePtr[i] == 0)
> goto clean_pics;
> picture_resource_t res = {
> - .p_sys = (void*)(uintptr_t)i,
> + .p_sys = p_sys->outputDevicePtr[i],
> };
> pics[i] = picture_NewFromResource( &p_dec->fmt_out.video, &res );
> if (unlikely(pics[i] == NULL))
> @@ -391,8 +391,7 @@ static int CUDAAPI HandlePictureDisplay(void *p_opaque, CUVIDPARSERDISPINFO *p_d
> NVDecCtxDestroy, NVDecCtxClone,
> p_sys->vctx_out,
> };
> - uintptr_t pool_idx = (uintptr_t)p_pic->p_sys;
> - picctx->devicePtr = p_sys->outputDevicePtr[pool_idx];
> + picctx->devicePtr = (CUdeviceptr)p_pic->p_sys;
> picctx->bufferPitch = p_sys->outputPitch;
> picctx->bufferHeight = p_sys->decoderHeight;
>
More information about the vlc-devel
mailing list