git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdd5175
)
DBus: Play rewinds at the beginning if there is an active input
author
Rafaël Carré
<funman@videolan.org>
Sat, 10 May 2008 10:50:00 +0000
(12:50 +0200)
committer
Rafaël Carré
<funman@videolan.org>
Sat, 10 May 2008 10:50:00 +0000
(12:50 +0200)
Fix #1566
modules/control/dbus.c
patch
|
blob
|
history
diff --git
a/modules/control/dbus.c
b/modules/control/dbus.c
index
06f716b
..
c8075a1
100644
(file)
--- a/
modules/control/dbus.c
+++ b/
modules/control/dbus.c
@@
-315,7
+315,22
@@
DBUS_METHOD( Play )
{
REPLY_INIT;
playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
- playlist_Play( p_playlist );
+
+ PL_LOCK;
+ input_thread_t *p_input = p_playlist->p_input;
+ if( p_input )
+ vlc_object_yield( p_input );
+ PL_UNLOCK;
+
+ if( p_input )
+ {
+ double i_pos = 0;
+ input_Control( p_input, INPUT_SET_POSITION, i_pos );
+ vlc_object_release( p_input );
+ }
+ else
+ playlist_Play( p_playlist );
+
pl_Release( p_playlist );
REPLY_SEND;
}