[vlc-commits] nvdec: more code cleaning

Steve Lhomme git at videolan.org
Tue Nov 19 15:52:38 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Nov 19 15:46:11 2019 +0100| [5973e920cdea5a170eff1188a6ae74431bc0b567] | committer: Steve Lhomme

nvdec: more code cleaning

We can copy the whole structure at once.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5973e920cdea5a170eff1188a6ae74431bc0b567
---

 modules/hw/nvdec/nvdec.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/modules/hw/nvdec/nvdec.c b/modules/hw/nvdec/nvdec.c
index bcfbe43f92..e82338dcd4 100644
--- a/modules/hw/nvdec/nvdec.c
+++ b/modules/hw/nvdec/nvdec.c
@@ -326,12 +326,7 @@ static struct picture_context_t *NVDecCtxClone(struct picture_context_t *srcctx)
         return NULL;
     pic_context_nvdec_t *srcpic = container_of(srcctx, pic_context_nvdec_t, ctx);
 
-    clonectx->ctx.destroy = NVDecCtxDestroy;
-    clonectx->ctx.copy = NVDecCtxClone;
-    clonectx->devidePtr = srcpic->devidePtr;
-    clonectx->bufferPitch = srcpic->bufferPitch;
-    clonectx->bufferHeight = srcpic->bufferHeight;
-    clonectx->nvdecDevice = srcpic->nvdecDevice;
+    *clonectx = *srcpic;
     return &clonectx->ctx;
 }
 



More information about the vlc-commits mailing list