Browse Source

VLCMediaPlayer.m: Be closer to libvlc.

Pierre d'Herbemont 17 years ago
parent
commit
d8c43b4672
1 changed files with 1 additions and 14 deletions
  1. 1 14
      Sources/VLCMediaPlayer.m

+ 1 - 14
Sources/VLCMediaPlayer.m

@@ -421,20 +421,13 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t *event, void *s
 //                usleep(1000);
         }
         
-        [self willChangeValueForKey:@"media"];
         [media release];
         media = [value retain];
-        [self didChangeValueForKey:@"media"];
 
         libvlc_exception_t ex;
         libvlc_exception_init( &ex );
         libvlc_media_instance_set_media_descriptor( instance, [media libVLCMediaDescriptor], &ex );
         quit_on_exception( &ex );
-        
-        if (media) {
-            if (wasPlaying)
-                [self play];
-        }
     }
 }
 
@@ -444,17 +437,11 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t *event, void *s
 }
 
 - (BOOL)play
-{
-    // Return if there is no media available or if the stream is already playing something
-    if (!media || [self isPlaying])
-        return [self isPlaying];
-    
+{    
     libvlc_exception_t ex;
     libvlc_exception_init( &ex );
-
     libvlc_media_instance_play( (libvlc_media_instance_t *)instance, &ex );
     quit_on_exception( &ex );
-
     return YES;
 }