mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-03 01:31:53 +02:00
control/dbus: dbus_player: clean PropertiesChangedSignal
The return-value of vlc_dictionary_all_keys is a null-terminated array of the associated keys (on success), meaning that there is no explicit need to query the count of keys. Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
This commit is contained in:
parent
de7f441a73
commit
a8a4b7fb0f
@ -782,7 +782,6 @@ PropertiesChangedSignal( intf_thread_t *p_intf,
|
||||
DBusMessageIter changed_properties, invalidated_properties;
|
||||
const char *psz_interface_name = DBUS_MPRIS_PLAYER_INTERFACE;
|
||||
char **ppsz_properties = NULL;
|
||||
int i_properties = 0;
|
||||
|
||||
SIGNAL_INIT( DBUS_INTERFACE_PROPERTIES,
|
||||
DBUS_MPRIS_OBJECT_PATH,
|
||||
@ -795,7 +794,6 @@ PropertiesChangedSignal( intf_thread_t *p_intf,
|
||||
&changed_properties ) )
|
||||
return DBUS_HANDLER_RESULT_NEED_MEMORY;
|
||||
|
||||
i_properties = vlc_dictionary_keys_count( p_changed_properties );
|
||||
ppsz_properties = vlc_dictionary_all_keys( p_changed_properties );
|
||||
|
||||
if( unlikely(!ppsz_properties) )
|
||||
@ -804,7 +802,7 @@ PropertiesChangedSignal( intf_thread_t *p_intf,
|
||||
return DBUS_HANDLER_RESULT_NEED_MEMORY;
|
||||
}
|
||||
|
||||
for( int i = 0; i < i_properties; i++ )
|
||||
for( int i = 0; ppsz_properties[i]; i++ )
|
||||
{
|
||||
PROPERTY_MAPPING_BEGIN
|
||||
PROPERTY_ENTRY( Metadata, "a{sv}" )
|
||||
|
Loading…
Reference in New Issue
Block a user