MPMoviePlayerController, Video is flickering upon second play back.

Discussion in 'iOS Programming' started by CorporateFelon, Jun 24, 2009.

  1. CorporateFelon macrumors regular

    CorporateFelon

    Joined:
    Oct 26, 2007
    Location:
    Boston, MA
    #1
    I'm using MPMoviePlayerController to play video, and its playing perfectly fine initially. However when I play the same movie again the video flickers. Yet If I play video A, then play video B, then play video A again the play back is normal. It is just when I play video A, then video A again that this happens.

    I'm using the follow code to initiate the play back.

    Code:
    MPMoviePlayerController *theMovie=[[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString: movieLocation]];
    	
    [[NSNotificationCenter defaultCenter] addObserver:self  selector:@selector(myMovieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:theMovie]; 
    	
    [theMovie play]; 
    And the following is called when the movie finished its playback.
    Code:
    -(void)myMovieFinishedCallback:(NSNotification*)aNotification 
    {
        MPMoviePlayerController* theMovie=[aNotification object]; 
        [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:theMovie]; 
    
        [theMovie release]; 
    	
    }
    
    If any one can point me in some direction as to why this is happening, or what I can do to fix it, it would be greatly appreciated.
     
  2. marcalanjones macrumors newbie

    Joined:
    Jun 26, 2009
    #2
    Did you get this issue resolved? I am having the same problem.

    Thanks.
     
  3. CorporateFelon thread starter macrumors regular

    CorporateFelon

    Joined:
    Oct 26, 2007
    Location:
    Boston, MA
    #3
    Not yet. When I finish some other functionality I'll take a look at my problem again. At the moment I've only tested on the simulator, and not on a device yet. At the moment I'm really hoping its just something buggy with the simulator.
     
  4. Joined:
    Jul 1, 2009
    #4
    Did you ever figure out why the movie would flicker and...

    Did you ever figure out why the movie would flicker and how to fix it?
     
  5. sinisa macrumors newbie

    Joined:
    Oct 25, 2008
    Location:
    Shanghai, China
    #5
    even Apple's MoviePlayer sample flickers

    I'm having same problem in Simulator, and haven't yet tried it on the device itself.

    When video is played for the first time, all is fine. As soon as I want to replay it, flickering appears, some times more severe, some times less.

    I've used exactly the same code as shown above in this thread.

    I've tried Apple's sample MoviePlayer, and, it flickers too when playing video again.

    Anyone found solution to this? Or is this just bug in Simulator?
     
  6. sneha macrumors newbie

    Joined:
    May 24, 2009
    Location:
    India
    #6
    I am also using MPMoviePlayer Controller to play videos .I am also having the same problem.:(:(
    I am having another problem when i tested on the device.

    I started playing video 1 and then stopped it and played video 2 then i repeated the same thing again nd again after sometime when my video 2 is playing i get frames from video 1...:confused::confused::confused:

    Its a very strange problem. Can any1 help me out with it???
     
  7. MacToddB macrumors 6502a

    MacToddB

    Joined:
    Aug 21, 2007
    Location:
    Rochester, NY
    #7
    I've seen this often on the simulator but never in the device and none of my customers has either. I vote simulator bug.
     

Share This Page