Commit 3629b93e authored by Rémi Duraffort's avatar Rémi Duraffort

qt4: the playlist should be locked when calling playlist_GetNodeDuration

parent 4fef4b6d
......@@ -199,9 +199,14 @@ void PLSelector::updateTotalDuration( PLSelItem* item, const char* prefix )
QVariant playlistVariant = item->treeItem()->data( 0, PL_ITEM_ROLE );
playlist_item_t* node = playlistVariant.value<playlist_item_t*>();
/* Get the duration of the playlist item */
playlist_Lock( THEPL );
mtime_t mt_duration = playlist_GetNodeDuration( node );
playlist_Unlock( THEPL );
/* Formatting time */
QString qs_timeLabel( prefix );
mtime_t mt_duration = playlist_GetNodeDuration( node );
int i_seconds = mt_duration / 1000000;
int i_minutes = i_seconds / 60;
i_seconds = i_seconds % 60;
......
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