0

I can hear audio for about 5 seconds, and then my screen is constantly "Loading Movie..."

I am testing in the simulator.

STVideo *mySTVideo;
    mySTVideo = [items objectAtIndex:indexPath.row];

    moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:mySTVideo.video_url]];

    NSLog(@"URL: %@", mySTVideo.video_url);

    moviePlayerViewController.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"st-screen.png"]];
    [self presentMoviePlayerViewControllerAnimated:moviePlayerViewController];

    [moviePlayerViewController release];
Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556
  • check this http://cocoabugs.blogspot.com/2010/08/troubleshoting-iphone.html –  Jan 13 '11 at 07:41

2 Answers2

1

http://spin.atomicobject.com/2010/09/02/mpmovieplayerviewcontroller-check-yourself-before-you-wreck-yourself

good explanation, did the trick

Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556
0

I think presentMoviePlayerViewControllerAnimated: doesn't retain the moviePlayer and you are releasing it in the next line. Try deleting the release line and see if it works, if it does create a property to retain the moviePlayer and skip the leak.

Bruno Domingues
  • 1,017
  • 9
  • 12