[vlc-commits] qt: use stack for SD descriptor structure
Rémi Denis-Courmont
git at videolan.org
Tue Nov 15 23:09:58 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov 16 00:09:23 2016 +0200| [3efc8f324196cb152b96e84ace97512448186acf] | committer: Rémi Denis-Courmont
qt: use stack for SD descriptor structure
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3efc8f324196cb152b96e84ace97512448186acf
---
modules/gui/qt/components/playlist/selector.cpp | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/modules/gui/qt/components/playlist/selector.cpp b/modules/gui/qt/components/playlist/selector.cpp
index 7f2631c..4259ac8 100644
--- a/modules/gui/qt/components/playlist/selector.cpp
+++ b/modules/gui/qt/components/playlist/selector.cpp
@@ -368,15 +368,12 @@ void PLSelector::setSource( QTreeWidgetItem *item )
if ( playlist_ServicesDiscoveryAdd( THEPL, qtu( qs ) ) != VLC_SUCCESS )
return ;
- services_discovery_descriptor_t *p_test = new services_discovery_descriptor_t;
- if( p_test )
+ services_discovery_descriptor_t test;
+
+ if ( playlist_ServicesDiscoveryControl( THEPL, qtu( qs ),
+ SD_CMD_DESCRIPTOR, &test ) == VLC_SUCCESS )
{
- if ( playlist_ServicesDiscoveryControl( THEPL, qtu( qs ),
- SD_CMD_DESCRIPTOR, p_test ) == VLC_SUCCESS )
- {
- item->setData( 0, CAP_SEARCH_ROLE, (p_test->i_capabilities & SD_CAP_SEARCH) );
- }
- delete p_test;
+ item->setData( 0, CAP_SEARCH_ROLE, (test.i_capabilities & SD_CAP_SEARCH) );
}
}
}
More information about the vlc-commits
mailing list