Problema al reproducir video en MPMoviePlayerController para iPad

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];

preguntado el 09 de enero de 11 a las 05:01

2 Respuestas

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.

Respondido el 09 de enero de 11 a las 17:01

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.