[vlc-devel] [PATCH] player: assert that the player is not locked from aout/vout callbacks

Thomas Guillem thomas at gllm.fr
Fri Aug 23 14:33:23 CEST 2019


---
 src/player/player.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/player/player.c b/src/player/player.c
index a0c421511b..839fd0eea7 100644
--- a/src/player/player.c
+++ b/src/player/player.c
@@ -891,6 +891,11 @@ vlc_player_SelectPrevChapter(vlc_player_t *player)
 void
 vlc_player_Lock(vlc_player_t *player)
 {
+    /* Vout and aout locks should not be held, cf. vlc_player_vout_cbs and
+     * vlc_player_aout_cbs documentation */
+    assert(!vlc_mutex_marked(&player->vout_listeners_lock));
+    assert(!vlc_mutex_marked(&player->aout_listeners_lock));
+
     vlc_mutex_lock(&player->lock);
 }
 
-- 
2.20.1



More information about the vlc-devel mailing list