]> git.sesse.net Git - vlc/commit
Qt4: correct fix for duplicate items in playlist - service-discovery
authorJakob Leben <jleben@videolan.org>
Tue, 27 Oct 2009 01:45:28 +0000 (02:45 +0100)
committerJakob Leben <jleben@videolan.org>
Tue, 27 Oct 2009 02:05:07 +0000 (03:05 +0100)
commit3dfec6e849180c7f975bebc9cee24f1bd51132a8
tree84e5955beab66458b14ba717270d060b903ef75f
parentf4e0745ef5bf931281053c36c8a633566b87f29e
Qt4: correct fix for duplicate items in playlist - service-discovery

Hypothesis: The bug stems from a thread concurrency problem. A PLModel::rebuild() happens
just between SD inserting items into the core playlist and Qt playlist receiving item-added callback.
Thus, the items referred to the callback are inserted twice into the Qt playlist.

Solution: check if item already inserted at callback processing.
modules/gui/qt4/components/playlist/playlist_model.cpp