]> git.sesse.net Git - vlc/commit
playlist_CreateNode(): add an argument to specify an input_item_t to be linked with...
authorRafaël Carré <funman@videolan.org>
Thu, 18 Oct 2007 15:34:01 +0000 (15:34 +0000)
committerRafaël Carré <funman@videolan.org>
Thu, 18 Oct 2007 15:34:01 +0000 (15:34 +0000)
commitf452c11004a9eddf5fa3c9342b44590c936018a1
tree83f0699a23f894aa1d37dfe3e8369bf6aca4c591
parentfbce9b9638ce65acc8c4c8bb1c9d7405d4378bc8
playlist_CreateNode(): add an argument to specify an input_item_t to be linked with the node, rather than creating a new input.
Setting that argument to NULL will make playlist_CreateNode() behave like previously.

That way we can create only one input per pair of node (for local playlist, media library, and service discovery)
Previous behaviour was to create 2 inputs with the same i_id member, but we would store both input in a binary search tree (sorted by i_id), and that kind of tree MUST NOT have 2 items with the same key, else we will get some bad memory corruption when the wrong input is removed from the tree (the other being left in the tree while the memory referred by it was freed).
Note that this breaks ABI
include/vlc_playlist.h
modules/access/directory.c
modules/gui/macosx/playlist.m
modules/gui/wxwidgets/dialogs/playlist.cpp
modules/services_discovery/upnp_cc.cpp
modules/services_discovery/upnp_intel.cpp
src/playlist/engine.c
src/playlist/services_discovery.c
src/playlist/tree.c