[vlc-commits] Fix dbus error (close #5977)

Edward Sheldrake git at videolan.org
Fri Feb 3 16:39:32 CET 2012


vlc/vlc-2.0 | branch: master | Edward Sheldrake <ejsheldrake at gmail.com> | Thu Feb  2 16:23:47 2012 +0000| [b7d9f84907202ba975cb7429c9c5b311af5f5f9c] | committer: Rémi Denis-Courmont

Fix dbus error (close #5977)

Fix dbus assertion failure which aborts vlc when the dbus control
plugin is active and you try to launch vlc with a large number of files
on the command line (such as when doing "vlc *" to play all the files
in a directory).

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
(cherry picked from commit 2e1a59d0a1fcca58171b890416a39e22db7adb6f)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=b7d9f84907202ba975cb7429c9c5b311af5f5f9c
---

 modules/control/dbus/dbus_player.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/control/dbus/dbus_player.c b/modules/control/dbus/dbus_player.c
index c13e09b..5cf3503 100644
--- a/modules/control/dbus/dbus_player.c
+++ b/modules/control/dbus/dbus_player.c
@@ -309,7 +309,7 @@ MarshalCanPlay( intf_thread_t *p_intf, DBusMessageIter *container )
     playlist_t *p_playlist = p_intf->p_sys->p_playlist;
 
     PL_LOCK;
-    dbus_bool_t b_can_play = playlist_CurrentSize( p_playlist );
+    dbus_bool_t b_can_play = playlist_CurrentSize( p_playlist ) > 0;
     PL_UNLOCK;
 
     dbus_message_iter_append_basic( container, DBUS_TYPE_BOOLEAN, &b_can_play );



More information about the vlc-commits mailing list