vlc | branch: master | Steve Lhomme <[email protected]> | Fri Jul 31 07:22:07 
2020 +0200| [855dbc02b1826e0cf67faeda462aba74f6824139] | committer: Steve Lhomme

nvdec: use picture_NewFromFormat for opaque pictures

No need to go through fake resources. No planes will be allocated. We just set
the p_sys manually.

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

 modules/hw/nvdec/nvdec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/hw/nvdec/nvdec.c b/modules/hw/nvdec/nvdec.c
index acf8e06a15..a7c8c70b9c 100644
--- a/modules/hw/nvdec/nvdec.c
+++ b/modules/hw/nvdec/nvdec.c
@@ -178,12 +178,10 @@ static nvdec_pool_t* nvdec_pool_Create(vlc_video_context 
*vctx,
         if (ret != CUDA_SUCCESS || pool->outputDevicePtr[i] == 0)
             goto free_pool;
 
-        picture_resource_t res = {
-            .p_sys = pool->outputDevicePtr[i],
-        };
-        pics[i] = picture_NewFromResource(fmt, &res);
+        pics[i] = picture_NewFromFormat(fmt);
         if (!pics[i])
             goto free_pool;
+        pics[i]->p_sys = (void*)(uintptr_t)pool->outputDevicePtr[i];
     }
 
     pool->picture_pool = picture_pool_New(ARRAY_SIZE(pool->outputDevicePtr), 
pics);

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to