电影播放器​​的激活状态错误(1)

问题描述:

嗨!我正在从视频URL捕获视频的缩略图.而且我正在使用以下代码来捕获缩略图

Hi! I am capturing the thumbnail image of video from video url. And I am using following code to capture the thumbnail

MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc]initWithContentURL:movieURL];
[moviePlayer setControlStyle:MPMovieControlStyleFullscreen];
[moviePlayer setFullscreen:YES];
moviePlayer.useApplicationAudioSession = NO;
UIImage *image = [moviePlayer  thumbnailImageAtTime:(NSTimeInterval)1.0 timeOption: MPMovieTimeOptionNearestKeyFrame];

我正在为此使用线程.我收到以下错误:

I am using threading for this. I am getting the following error:

电影播放器​​的激活状态(1)错误

Movie player has wrong activation state (1)

有人可以帮助我吗?

init正在播放电影播放器​​时,您已经拥有一个.只能有一个MPMoviePlayerController.您可能正在循环执行此操作.您需要将最后一个设置为nil或一遍又一遍地重复使用.

When you are initing the movie player, you already have one. There can be only one MPMoviePlayerController. You are probably doing this in a loop. You need to set your last one to nil or keep reusing the same one over and over.