Commit 8f754d87 authored by Alex Merry's avatar Alex Merry Committed by Mirsal Ennaime

Fix Rate property on org.mpris.MediaPlayer2.Player

Rate should never be 0.0 (according to the spec), so we pick a sensible
default when we do not have a current track: 1.0.

Also, when the current item changes, the Rate may also change.  So add
it to the PropertiesChanged signal just to be sure.
Signed-off-by: default avatarMirsal Ennaime <mirsal@videolan.org>
parent ad8039e3
......@@ -519,6 +519,11 @@ static void ProcessEvents( intf_thread_t *p_intf,
{
case SIGNAL_ITEM_CURRENT:
TrackChange( p_intf );
// rate depends on current item
if( !vlc_dictionary_has_key( &tracklist_properties, "Rate" ) )
vlc_dictionary_insert( &player_properties, "Rate", NULL );
vlc_dictionary_insert( &player_properties, "Metadata", NULL );
break;
case SIGNAL_INTF_CHANGE:
......
......@@ -520,7 +520,7 @@ MarshalRate( intf_thread_t *p_intf, DBusMessageIter *container )
vlc_object_release( (vlc_object_t*) p_input );
}
else
d_rate = 0.;
d_rate = 1.0;
dbus_message_iter_append_basic( container, DBUS_TYPE_DOUBLE, &d_rate );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment