player: vout: fix fullscreen/wallpaper toggle
authorAkshay V <vvaakshay@gmail.com>
Tue, 14 Jan 2020 16:00:13 +0000 (21:30 +0530)
committerThomas Guillem <thomas@gllm.fr>
Wed, 15 Jan 2020 09:26:18 +0000 (10:26 +0100)
This commit fixes:
 - The fullscreen hotkey not exiting fullscreen
 - Wallpaper mode hotkey not disabling wallpaper mode

Fixes #22418

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
src/player/vout.c

index b285992..4bb6412 100644 (file)
@@ -100,7 +100,10 @@ vlc_player_vout_RemoveListener(vlc_player_t *player,
 bool
 vlc_player_vout_IsFullscreen(vlc_player_t *player)
 {
-    return var_GetBool(player, "fullscreen");
+    vout_thread_t *vout = vlc_player_vout_Hold(player);
+    bool fs =  var_GetBool(vout, "fullscreen");
+    vout_Release(vout);
+    return fs;
 }
 
 static int
@@ -185,7 +188,10 @@ vlc_player_vout_SetFullscreen(vlc_player_t *player, bool enabled)
 bool
 vlc_player_vout_IsWallpaperModeEnabled(vlc_player_t *player)
 {
-    return var_GetBool(player, "video-wallpaper");
+    vout_thread_t *vout = vlc_player_vout_Hold(player);
+    bool wm =  var_GetBool(vout, "video-wallpaper");
+    vout_Release(vout);
+    return wm;
 }
 
 void