Browse Source

VLCMediaPlayer: change pause behavior

The pause method is not toggling the pause state anymore. This fixes possible
inconsistencies when the input is paused from an other thread.
Thomas Guillem 7 years ago
parent
commit
9fd752da6b
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Headers/Public/VLCMediaPlayer.h
  2. 1 1
      Sources/VLCMediaPlayer.m

+ 1 - 1
Headers/Public/VLCMediaPlayer.h

@@ -659,7 +659,7 @@ extern NSString *const VLCTitleDescriptionIsMenu;
 - (void)play;
 
 /**
- * Toggle's the pause state of the feed.
+ * Set the pause state of the feed. Do nothing if already paused.
  */
 - (void)pause;
 

+ 1 - 1
Sources/VLCMediaPlayer.m

@@ -1103,7 +1103,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self)
     }
 
     // Pause the stream
-    libvlc_media_player_pause(_playerInstance);
+    libvlc_media_player_set_pause(_playerInstance, 1);
 }
 
 - (void)stop