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.
And the following is called when the movie finished its playback.
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.
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.