[vlc-commits] commit: dbus: playlist locking (Jakob Leben )
git at videolan.org
git at videolan.org
Fri Jun 11 19:57:39 CEST 2010
vlc | branch: master | Jakob Leben <jleben at videolan.org> | Fri Jun 11 19:17:59 2010 +0200| [59048279bbcccb99d3849c58774500f7db9b5584] | committer: Jakob Leben
dbus: playlist locking
untested
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=59048279bbcccb99d3849c58774500f7db9b5584
---
modules/control/dbus.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/control/dbus.c b/modules/control/dbus.c
index bd59f82..f3be831 100644
--- a/modules/control/dbus.c
+++ b/modules/control/dbus.c
@@ -928,8 +928,10 @@ DBUS_SIGNAL( TrackListChangeSignal )
SIGNAL_INIT( MPRIS_DBUS_TRACKLIST_PATH, "TrackListChange");
OUT_ARGUMENTS;
- /* XXX: locking */
- dbus_int32_t i_elements = ((intf_thread_t*)p_data)->p_sys->p_playlist->current.i_size;
+ playlist_t *p_playlist = ((intf_thread_t*)p_data)->p_sys->p_playlist;
+ PL_LOCK;
+ dbus_int32_t i_elements = p_playlist->current.i_size;
+ PL_UNLOCK;
ADD_INT32( &i_elements );
SIGNAL_SEND;
More information about the vlc-commits
mailing list