[vlc-devel] [PATCH] qt: fix the representation of the playlist tree in debug view

Rémi Denis-Courmont remi at remlab.net
Wed Sep 6 15:28:24 CEST 2017


Le 6 septembre 2017 16:25:43 GMT+03:00, pierre at videolabs.io a écrit :
>On Wednesday, September 6, 2017 4:21:42 PM CEST Rémi Denis-Courmont
>wrote:
>> Le 6 septembre 2017 16:04:09 GMT+03:00, Pierre Lamot
><pierre at videolabs.io> a 
>écrit :
>> >The playlist root node is an empty node, it doesn't have a p_input
>> >field.
>> >
>> >  Thus it should'nt (and can't) be displayer
>> >
>> >---
>> >
>> > modules/gui/qt/dialogs/messages.cpp | 4 +++-
>> > 1 file changed, 3 insertions(+), 1 deletion(-)
>> >
>> >diff --git a/modules/gui/qt/dialogs/messages.cpp
>> >b/modules/gui/qt/dialogs/messages.cpp
>> >index d6a0ecc992..e2b1e80af3 100644
>> >--- a/modules/gui/qt/dialogs/messages.cpp
>> >+++ b/modules/gui/qt/dialogs/messages.cpp
>> >@@ -378,7 +378,9 @@ void MessagesDialog::updatePLTree()
>> >
>> >     {
>> >     
>> >         vlc_playlist_locker pl_lock ( THEPL );
>> >
>> >-        pldebugTree->addTopLevelItem( PLWalk( &p_playlist->root )
>);
>> >+        playlist_item_t *p_node = &p_playlist->root;
>> >+        for ( int i = 0; p_node->i_children > 0 && i <
>> >p_node->i_children; i++ )
>> >+            pldebugTree->addTopLevelItem( PLWalk(
>p_node->pp_children[
>> >i ] ) );
>> >
>> >     }
>> >     
>> >     pldebugTree->expandAll();
>> 
>> The point of this debugger is to show the playlist state as it
>actually is.
>> I fundamentally disagree with this change.
>
>Actually, in the current state, the program segv when entering this
>methods 
>because p_playlist->root -> p_input is NULL and most fields aren't
>sets. My 
>understanding is that the root node is there to holds reference to to
>top 
>level nodes.
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

The root node is there for backward compatibility with some interfaces treating the playlist as a single tree.
-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.


More information about the vlc-devel mailing list