[vlc-commits] nvdec: fix segfault in nvdec_gl

Quentin Chateau git at videolan.org
Tue Apr 7 10:32:17 CEST 2020


vlc | branch: master | Quentin Chateau <quentin.chateau at deepskycorp.com> | Tue Apr  7 10:17:40 2020 +0200| [288a2e79bb4c4ebb15ed641919ae4dd21e6d4bb8] | committer: Steve Lhomme

nvdec: fix segfault in nvdec_gl

interop->priv is only set at the end of the Open function,
Close must not be called before the Open function returned
successfully

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

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

 modules/hw/nvdec/nvdec_gl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/hw/nvdec/nvdec_gl.c b/modules/hw/nvdec/nvdec_gl.c
index 137e730028..9d994b40cd 100644
--- a/modules/hw/nvdec/nvdec_gl.c
+++ b/modules/hw/nvdec/nvdec_gl.c
@@ -212,7 +212,7 @@ static int Open(vlc_object_t *obj)
     int ret = opengl_interop_init(interop, GL_TEXTURE_2D, render_chroma, interop->fmt.space);
     if (ret != VLC_SUCCESS)
     {
-        Close(obj);
+        vlc_decoder_device_Release(device);
         return ret;
     }
 



More information about the vlc-commits mailing list