[vlc-commits] [Git][videolan/vlc][master] 2 commits: interop_vdpau: don't use obj ressources
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sun Mar 15 07:18:19 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
618a5f06 by Thomas Guillem at 2026-03-15T06:58:25+00:00
interop_vdpau: don't use obj ressources
As vlc_obj_res is not public and can't be cleaned if a submodule fails.
Fix #29665
- - - - -
c7507cdc by Thomas Guillem at 2026-03-15T06:58:25+00:00
interop_vdpau: fix leak if VDPAUInitNV() fails
It was leaking the decoder-device, and sys (since last commit).
Refs #29665
- - - - -
1 changed file:
- modules/video_output/opengl/interop_vdpau.c
Changes:
=====================================
modules/video_output/opengl/interop_vdpau.c
=====================================
@@ -117,6 +117,7 @@ Close(struct vlc_gl_interop *interop)
assert(sys->gl.GetError() == GL_NO_ERROR);
vlc_decoder_device *dec_device = sys->dec_device;
vlc_decoder_device_Release(dec_device);
+ free(sys);
}
static int
@@ -137,7 +138,7 @@ Open(struct vlc_gl_interop *interop)
return VLC_EGENERIC;
}
- converter_sys_t *sys = vlc_obj_malloc(VLC_OBJECT(interop), sizeof(*sys));
+ converter_sys_t *sys = malloc(sizeof(*sys));
if (unlikely(sys == NULL))
{
vlc_decoder_device_Release(dec_device);
@@ -161,6 +162,7 @@ Open(struct vlc_gl_interop *interop)
!= VDP_STATUS_OK)
{
vlc_decoder_device_Release(dec_device);
+ free(sys);
return VLC_EGENERIC;
}
@@ -169,6 +171,7 @@ Open(struct vlc_gl_interop *interop)
if (sys->gl.fct == NULL) \
{ \
vlc_decoder_device_Release(dec_device); \
+ free(sys); \
return VLC_EGENERIC; \
}
SAFE_GPA(VDPAUInitNV);
@@ -182,7 +185,17 @@ Open(struct vlc_gl_interop *interop)
SAFE_GPA(VDPAUUnmapSurfacesNV);
#undef SAFE_GPA
- INTEROP_CALL(sys, VDPAUInitNV, (void *)(uintptr_t)device, vdp_gpa);
+ sys->gl.VDPAUInitNV((void *)(uintptr_t)device, vdp_gpa);
+ {
+ GLenum ret = (sys)->gl.GetError();
+ if (ret != GL_NO_ERROR)
+ {
+ msg_Err(interop->gl, "VDPAUInitNV failed: 0x%x", ret);
+ vlc_decoder_device_Release(dec_device);
+ free(sys);
+ return VLC_EGENERIC;
+ }
+ }
/* The pictures are uploaded upside-down */
video_format_TransformBy(&interop->fmt_out, TRANSFORM_VFLIP);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5bc746a4e7504047178e079a91d3258aadcf16d8...c7507cdc4b006f6c543c9fafb4b3e1880ebc2554
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5bc746a4e7504047178e079a91d3258aadcf16d8...c7507cdc4b006f6c543c9fafb4b3e1880ebc2554
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list