]> git.sesse.net Git - vlc/commitdiff
control/media_instance.c: Make sure the toggling the of the pause status implies...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Mon, 7 Jan 2008 15:49:39 +0000 (15:49 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Mon, 7 Jan 2008 15:49:39 +0000 (15:49 +0000)
src/control/media_instance.c

index f56c7af3702c2b10a07d558cdc1e1f2106609a8f..ce64024f8e3ba00e5c7721add16787a4dd60f80f 100644 (file)
@@ -546,7 +546,10 @@ void libvlc_media_instance_pause( libvlc_media_instance_t *p_mi,
     if( !p_input_thread )
         return;
 
-    input_Control( p_input_thread, INPUT_SET_STATE, PAUSE_S );
+    if( var_GetInteger( p_input_thread, "state" ) == PAUSE_S )
+        input_Control( p_input_thread, INPUT_SET_STATE, PLAYING_S );
+    else
+        input_Control( p_input_thread, INPUT_SET_STATE, PAUSE_S );
     vlc_object_release( p_input_thread );
 }