Commit 9a31d3ab authored by Laurent Aimar's avatar Laurent Aimar

Fix unprotected access of input item (skins2).

parent c1986e20
......@@ -46,9 +46,10 @@ void CmdUpdateItem::execute()
// Get playlist item information
input_item_t *pItem = input_GetItem( p_input );
// XXX: we should not need to access p_input->psz_source directly, a
// getter should be provided by VLC core
string name = pItem->psz_name;
char *pszName = input_item_GetName( pItem );
char *pszUri = input_item_GetURI( pItem );
string name = pszName;
// XXX: This should be done in VLC core, not here...
// Remove path information if any
OSFactory *pFactory = OSFactory::instance( getIntf() );
......@@ -58,7 +59,10 @@ void CmdUpdateItem::execute()
name = name.substr( pos + 1, name.size() - pos + 1 );
}
UString srcName( getIntf(), name.c_str() );
UString srcURI( getIntf(), pItem->psz_uri );
UString srcURI( getIntf(), pszUri );
free( pszName );
free( pszUri );
// Create commands to update the stream variables
CmdSetText *pCmd1 = new CmdSetText( getIntf(), m_rStreamName, srcName );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment