]> git.sesse.net Git - vlc/blobdiff - modules/video_output/msw/directx.c
Replaced a certain amount of vlc_object_find by pl_Yield
[vlc] / modules / video_output / msw / directx.c
index 56aade1f8be2968483240de30caabe42c8b1ffb9..084968d7b4dcd587366063cb3a295c4c148233d5 100644 (file)
@@ -2125,18 +2125,12 @@ static int WallpaperCallback( vlc_object_t *p_this, char const *psz_cmd,
     {
         playlist_t *p_playlist;
 
-        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 );
-        }
+        p_playlist = pl_Yield( p_this );
+        /* 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 );
 
         p_vout->p_sys->i_changes |= DX_WALLPAPER_CHANGE;
     }