X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fvideo_output%2Fmsw%2Fdirectx.c;h=084968d7b4dcd587366063cb3a295c4c148233d5;hb=fd6294273ec43243abac97dd11b4fca1cd4f0257;hp=56aade1f8be2968483240de30caabe42c8b1ffb9;hpb=6a498752f498c192bcdde2f37609746c28db1df2;p=vlc diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c index 56aade1f8b..084968d7b4 100644 --- a/modules/video_output/msw/directx.c +++ b/modules/video_output/msw/directx.c @@ -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; }