[vlc-commits] nvdec: only clean the hxxl helper if it was used

Steve Lhomme git at videolan.org
Wed Oct 2 15:00:31 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Oct  2 14:32:15 2019 +0200| [7899aa9b2436a0e66ade193833fb0bebf9718030] | committer: Steve Lhomme

nvdec: only clean the hxxl helper if it was used

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

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

diff --git a/modules/hw/nvdec/nvdec.c b/modules/hw/nvdec/nvdec.c
index b0f46f83b6..4040c08ae8 100644
--- a/modules/hw/nvdec/nvdec.c
+++ b/modules/hw/nvdec/nvdec.c
@@ -713,12 +713,14 @@ static int OpenDecoder(vlc_object_t *p_this)
 
     result = cuvid_load_functions(&p_sys->cuvidFunctions, p_dec);
     if (result != VLC_SUCCESS) {
-        hxxx_helper_clean(&p_sys->hh);
+        if (p_sys->b_is_hxxx)
+            hxxx_helper_clean(&p_sys->hh);
         return VLC_EGENERIC;
     }
     result = cuda_load_functions(&p_sys->cudaFunctions, p_dec);
     if (result != VLC_SUCCESS) {
-        hxxx_helper_clean(&p_sys->hh);
+        if (p_sys->b_is_hxxx)
+            hxxx_helper_clean(&p_sys->hh);
         return VLC_EGENERIC;
     }
 
@@ -756,7 +758,8 @@ static int OpenDecoder(vlc_object_t *p_this)
         result = hxxx_helper_get_chroma_chroma(&p_sys->hh, &i_chroma_idc,
                                             &i_depth_luma, &i_depth_chroma);
         if (result != VLC_SUCCESS) {
-            hxxx_helper_clean(&p_sys->hh);
+            if (p_sys->b_is_hxxx)
+                hxxx_helper_clean(&p_sys->hh);
             return VLC_EGENERIC;
         }
         cudaChroma = MapChomaIDC(i_chroma_idc);



More information about the vlc-commits mailing list