Commit 847690d2 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: MLItem: add missing lock and fix scheme fixing

parent 1ebf4b12
......@@ -286,12 +286,15 @@ ml_media_t* MLItem::getMedia() const
QUrl MLItem::getUri() const
{
if( !media->psz_uri ) return QUrl(); // This should be rootItem
QString uri = qfu( media->psz_uri );
if( uri.contains( "://" ) )
return QUrl( uri );
else
return QUrl( "file://" + uri );
QString uri;
vlc_mutex_lock( &media->lock );
uri = QString( media->psz_uri );
vlc_mutex_unlock( &media->lock );
if ( uri.isEmpty() ) return QUrl(); // This should be rootItem
QUrl url( uri );
if ( url.scheme().isEmpty() ) url.setScheme( "file" );
return url;
}
bool MLItem::operator<( MLItem* item )
......
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