[vlc-commits] Revert "DirectX: use parent object instead of -incorrectly- pl_Get()"

Jean-Baptiste Kempf git at videolan.org
Thu Aug 15 20:42:38 CEST 2013


vlc/vlc-2.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Aug 15 16:41:54 2013 +0200| [055bfeaef6bc4a7058cef57603647ed8af3e7d4a] | committer: Jean-Baptiste Kempf

Revert "DirectX: use parent object instead of -incorrectly- pl_Get()"

This reverts commit 9797d69d29097a598384a5d87c35f1d859aab4b4.

(cherry picked from commit 1d83cf55daecc8ca5b0e69c1b7e73e6019d6daa0)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=055bfeaef6bc4a7058cef57603647ed8af3e7d4a
---

 modules/video_output/msw/direct3d.c |    6 ++++--
 modules/video_output/msw/directx.c  |    6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/modules/video_output/msw/direct3d.c b/modules/video_output/msw/direct3d.c
index 94ef0a0..b08db20 100644
--- a/modules/video_output/msw/direct3d.c
+++ b/modules/video_output/msw/direct3d.c
@@ -39,6 +39,7 @@
 
 #include <vlc_common.h>
 #include <vlc_plugin.h>
+#include <vlc_playlist.h>
 #include <vlc_vout_display.h>
 
 #include <windows.h>
@@ -1447,10 +1448,11 @@ static int DesktopCallback(vlc_object_t *object, char const *psz_cmd,
 
     /* FIXME we should have a way to export variable to be saved */
     if (ch_desktop) {
+        playlist_t *p_playlist = pl_Get(vd);
         /* Modify playlist as well because the vout might have to be
          * restarted */
-        var_Create(object->p_parent, "video-wallpaper", VLC_VAR_BOOL);
-        var_SetBool(object->p_parent, "video-wallpaper", newval.b_bool);
+        var_Create(p_playlist, "video-wallpaper", VLC_VAR_BOOL);
+        var_SetBool(p_playlist, "video-wallpaper", newval.b_bool);
     }
     return VLC_SUCCESS;
 }
diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index bcc5c85..4bf7e52 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.c
@@ -42,6 +42,7 @@
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_vout_display.h>
+#include <vlc_playlist.h>   /* needed for wallpaper */
 #include <vlc_charset.h>
 
 #include <windows.h>
@@ -1407,10 +1408,11 @@ static int WallpaperCallback(vlc_object_t *object, char const *cmd,
 
     /* FIXME we should have a way to export variable to be saved */
     if (ch_wallpaper) {
+        playlist_t *p_playlist = pl_Get(vd);
         /* Modify playlist as well because the vout might have to be
          * restarted */
-        var_Create(object->p_parent, "video-wallpaper", VLC_VAR_BOOL);
-        var_SetBool(object->p_parent, "video-wallpaper", newval.b_bool);
+        var_Create(p_playlist, "video-wallpaper", VLC_VAR_BOOL);
+        var_SetBool(p_playlist, "video-wallpaper", newval.b_bool);
     }
     return VLC_SUCCESS;
 }



More information about the vlc-commits mailing list