diff --git a/modules/misc/notify/notify.c b/modules/misc/notify/notify.c index 81b85ca8bfd8c2bfe77e66c64f8813a9216917fb..3a3d3c365997aed86bc96395efe099baa56928ff 100644 --- a/modules/misc/notify/notify.c +++ b/modules/misc/notify/notify.c @@ -144,14 +144,10 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, char *psz_artist = NULL; char *psz_album = NULL; char *psz_arturl = NULL; - input_thread_t *p_input = NULL; - playlist_t * p_playlist = pl_Yield( p_this ); + input_thread_t *p_input = ((playlist_t*) p_this)->p_input; intf_thread_t *p_intf = ( intf_thread_t* ) param; intf_sys_t *p_sys = p_intf->p_sys; - p_input = p_playlist->p_input; - pl_Release( p_this ); - if( !p_input ) return VLC_SUCCESS; vlc_object_yield( p_input ); diff --git a/modules/misc/notify/telepathy.c b/modules/misc/notify/telepathy.c index 45edea36b165ed03b4441e11e676dfa902638e03..4921d4641758af5b84e91eefb3ccd514910b9a40 100644 --- a/modules/misc/notify/telepathy.c +++ b/modules/misc/notify/telepathy.c @@ -169,6 +169,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, { VLC_UNUSED(oldval); intf_thread_t *p_intf = (intf_thread_t *)param; + playlist_t* p_playlist = (playlist_t*) p_this; char *psz_buf = NULL; input_thread_t *p_input; @@ -193,11 +194,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, p_intf->p_sys->i_item_changes++; } - - playlist_t *p_playlist = pl_Yield( p_this ); - p_input = p_playlist->p_input; - pl_Release( p_this ); if( !p_input ) return VLC_SUCCESS; vlc_object_yield( p_input ); @@ -219,7 +216,8 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, var_AddCallback( p_input, "state", StateChange, p_intf ); /* We format the string to be displayed */ - psz_buf = str_format_meta( p_this, p_intf->p_sys->psz_format ); + psz_buf = str_format_meta( (vlc_object_t*) p_intf, + p_intf->p_sys->psz_format ); /* We don't need the input anymore */ vlc_object_release( p_input );