*****************************************************************************/
static void ReadMetaData(intf_thread_t *p_this)
{
- input_thread_t *p_input;
- input_item_t *p_item;
+ intf_sys_t *p_sys = p_this->p_sys;
- intf_sys_t *p_sys = p_this->p_sys;
-
- p_input = playlist_CurrentInput(pl_Get(p_this));
+ input_thread_t *p_input = pl_CurrentInput(p_this);
if (!p_input)
return;
- p_item = input_GetItem(p_input);
+ input_item_t *p_item = input_GetItem(p_input);
if (!p_item)
{
vlc_object_release(p_input);
static int ItemChange(vlc_object_t *p_this, const char *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data)
{
- input_thread_t *p_input;
intf_thread_t *p_intf = (intf_thread_t*) p_data;
intf_sys_t *p_sys = p_intf->p_sys;
- input_item_t *p_item;
VLC_UNUSED(p_this); VLC_UNUSED(psz_var);
VLC_UNUSED(oldval); VLC_UNUSED(newval);
p_sys->b_meta_read = false;
p_sys->b_submit = false;
- p_input = playlist_CurrentInput(pl_Get(p_intf));
-
+ input_thread_t *p_input = pl_CurrentInput(p_intf);
if (!p_input || p_input->b_dead)
return VLC_SUCCESS;
- p_item = input_GetItem(p_input);
+ input_item_t *p_item = input_GetItem(p_input);
if (!p_item)
{
vlc_object_release(p_input);
*****************************************************************************/
static void Close(vlc_object_t *p_this)
{
- playlist_t *p_playlist = pl_Get(p_this);
- input_thread_t *p_input;
intf_thread_t *p_intf = (intf_thread_t*) p_this;
intf_sys_t *p_sys = p_intf->p_sys;
- var_DelCallback(p_playlist, "activity", ItemChange, p_intf);
+ var_DelCallback(pl_Get(p_intf), "activity", ItemChange, p_intf);
vlc_cancel(p_sys->thread);
vlc_join(p_sys->thread, NULL);
- p_input = playlist_CurrentInput(p_playlist);
+ input_thread_t *p_input = pl_CurrentInput(p_intf);
if (p_input)
{
if (p_sys->b_state_cb)
psz_scrobbler_url = var_InheritString(p_this, "scrobbler-url");
if (!psz_scrobbler_url)
{
+ free(psz_auth_token);
free(psz_username);
return VLC_ENOMEM;
}
"http://%s/?hs=true&p=1.2&c="CLIENT_NAME"&v="CLIENT_VERSION"&u=%s&t=%s&a=%s"
, psz_scrobbler_url, psz_username, psz_timestamp, psz_auth_token);
+ free(psz_auth_token);
free(psz_scrobbler_url);
free(psz_username);
if (i_ret == -1)
/* data about audioscrobbler session */
mtime_t next_exchange = -1; /**< when can we send data */
- unsigned int i_interval; /**< waiting interval (secs)*/
+ unsigned int i_interval = 0; /**< waiting interval (secs)*/
intf_sys_t *p_sys = p_intf->p_sys;