[vlc-commits] nvdec: set the video context in the picture context
Steve Lhomme
git at videolan.org
Mon Dec 2 13:42:51 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Nov 19 14:38:36 2019 +0100| [3d1f8a12e32b8eb772c94a6524a77d21409d263a] | committer: Steve Lhomme
nvdec: set the video context in the picture context
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3d1f8a12e32b8eb772c94a6524a77d21409d263a
---
modules/hw/nvdec/nvdec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/hw/nvdec/nvdec.c b/modules/hw/nvdec/nvdec.c
index 3b22088d94..e2741416ff 100644
--- a/modules/hw/nvdec/nvdec.c
+++ b/modules/hw/nvdec/nvdec.c
@@ -327,6 +327,7 @@ static struct picture_context_t *NVDecCtxClone(struct picture_context_t *srcctx)
pic_context_nvdec_t *srcpic = container_of(srcctx, pic_context_nvdec_t, ctx);
*clonectx = *srcpic;
+ vlc_video_context_Hold(clonectx->ctx.vctx);
return &clonectx->ctx;
}
@@ -372,7 +373,7 @@ static int CUDAAPI HandlePictureDisplay(void *p_opaque, CUVIDPARSERDISPINFO *p_d
goto error;
picctx->ctx = (picture_context_t) {
NVDecCtxDestroy, NVDecCtxClone,
- NULL /*TODO*/
+ p_sys->vctx_out,
};
uintptr_t pool_idx = (uintptr_t)p_pic->p_sys;
picctx->devidePtr = p_sys->outputDevicePtr[pool_idx];
@@ -408,6 +409,7 @@ static int CUDAAPI HandlePictureDisplay(void *p_opaque, CUVIDPARSERDISPINFO *p_d
dstY += p_sys->decoderHeight;
}
p_pic->context = &picctx->ctx;
+ vlc_video_context_Hold(picctx->ctx.vctx);
}
else
{
More information about the vlc-commits
mailing list