]> git.sesse.net Git - vlc/blobdiff - modules/video_output/msw/directx.c
Use pl_Release with the right argument.
[vlc] / modules / video_output / msw / directx.c
index afc6be2fec444e3030f2ec2582b5c1cc6d13dc1d..a6ee80b852008bf3970f465801003e1baa3a461e 100644 (file)
@@ -40,7 +40,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_interface.h>
 #include <vlc_playlist.h>
@@ -691,7 +691,7 @@ static int Manage( vout_thread_t *p_vout )
     }
 
     /* Check if the event thread is still running */
-    if( p_vout->p_sys->p_event->b_die )
+    if( !vlc_object_alive (p_vout->p_sys->p_event) )
     {
         return VLC_EGENERIC; /* exit */
     }
@@ -2123,19 +2123,15 @@ static int WallpaperCallback( vlc_object_t *p_this, char const *psz_cmd,
     if( (newval.b_bool && !p_vout->p_sys->b_wallpaper) ||
         (!newval.b_bool && p_vout->p_sys->b_wallpaper) )
     {
-        playlist_t *p_playlist;
+        playlist_t *p_playlist = pl_Yield( p_vout );
 
-        p_playlist =
-            (playlist_t *)vlc_object_find( p_this, VLC_OBJECT_PLAYLIST,
-                                           FIND_PARENT );
         if( p_playlist )
         {
             /* Modify playlist as well because the vout might have to be
              * restarted */
             var_Create( p_playlist, "directx-wallpaper", VLC_VAR_BOOL );
             var_Set( p_playlist, "directx-wallpaper", newval );
-
-            vlc_object_release( p_playlist );
+            pl_Release( p_vout );
         }
 
         p_vout->p_sys->i_changes |= DX_WALLPAPER_CHANGE;