[vlc-devel] [PATCH] qt: force signals from the player callbacks to be emmited from a queued connection.
Pierre Lamot
pierre at videolabs.io
Mon Oct 21 17:44:20 CEST 2019
callbacks are called with the player locked, if the callback commes from Qt thread,
the signal emitted by Qt may be handled within the same thread directly and ask for
the player lock again.
---
modules/gui/qt/components/player_controller.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/components/player_controller.cpp b/modules/gui/qt/components/player_controller.cpp
index 3bfafcc338..1b3b0d820a 100644
--- a/modules/gui/qt/components/player_controller.cpp
+++ b/modules/gui/qt/components/player_controller.cpp
@@ -239,7 +239,9 @@ static void on_player_current_media_changed(vlc_player_t *, input_item_t *new_m
if (!new_media)
{
- emit that->q_func()->inputChanged(false);
+ that->callAsync([that] () {
+ emit that->q_func()->inputChanged(false);
+ });
return;
}
@@ -721,7 +723,9 @@ static void on_player_media_epg_changed(vlc_player_t *, input_item_t *, void *da
{
PlayerControllerPrivate* that = static_cast<PlayerControllerPrivate*>(data);
msg_Dbg( that->p_intf, "on_player_item_epg_changed");
- emit that->q_func()->epgChanged();
+ that->callAsync([that] () {
+ emit that->q_func()->epgChanged();
+ });
}
static void on_player_subitems_changed(vlc_player_t *, input_item_t *, input_item_node_t *, void *data)
--
2.17.1
More information about the vlc-devel
mailing list