0

我可以听到大约5秒的音频,然后我的屏幕是不断“加载电影...”问题,玩视频的MPMoviePlayerController为iPad

我在模拟器上测试。

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

检查这个http://cocoabugs.blogspot.com/2010/08/troubleshoting-iphone.html – 2011-01-13 07:41:10

回答

0

我想presentMoviePlayerViewControllerAnimated:不保留moviePlayer和你在下一行释放它。 尝试删除发布行并查看它是否有效,如果它确实创建了一个属性来保留moviePlayer并跳过泄漏。

相关问题