[vlc-devel] [PATCH 2/3] qt: use (input|aout|vout)_(Hold|Release) in menus
RĂ©mi Denis-Courmont
remi at remlab.net
Sun Mar 17 10:56:47 CET 2019
---
modules/gui/qt/menus.cpp | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt/menus.cpp b/modules/gui/qt/menus.cpp
index 1e7b34b386..cb446cb549 100644
--- a/modules/gui/qt/menus.cpp
+++ b/modules/gui/qt/menus.cpp
@@ -94,19 +94,40 @@ static QVLCObject wrap(intf_thread_t *intf)
return QVLCObject(VLC_OBJECT(intf), releaseDummy);
}
+static void releaseInput(vlc_object_t *input)
+{
+ input_Release((input_thread_t *)input);
+}
+
static QVLCObject wrap(input_thread_t *input)
{
- return QVLCObject(VLC_OBJECT(input), releaseDummy);
+ if (input != NULL)
+ input_Hold(input);
+ return QVLCObject(VLC_OBJECT(input), releaseInput);
+}
+
+static void releaseAout(vlc_object_t *aout)
+{
+ aout_Release((audio_output_t *)aout);
}
static QVLCObject wrap(audio_output_t *aout)
{
- return QVLCObject(VLC_OBJECT(aout), releaseDummy);
+ if (aout != NULL)
+ aout_Hold(aout);
+ return QVLCObject(VLC_OBJECT(aout), releaseAout);
+}
+
+static void releaseVout(vlc_object_t *vout)
+{
+ vout_Release((vout_thread_t *)vout);
}
static QVLCObject wrap(vout_thread_t *vout)
{
- return QVLCObject(VLC_OBJECT(vout), releaseDummy);
+ if (vout != NULL)
+ vout_Hold(vout);
+ return QVLCObject(VLC_OBJECT(vout), releaseVout);
}
/**
--
2.20.1
More information about the vlc-devel
mailing list