I discovered a strange behavoir of the MPMoviePlayerController on the iPad. I created an application for the iPad where you can choose different media (audio/video) from a list. The chosen media ist played on a detail view. There's no problem with playing audio and I can play every video at least once. The problem occures only when I choose a video a second time from the list. Then the detail view will show but the movie pauses. I can touch the play button as often as I want... it still won't start playing but pauses again immediately. The movie seems to load correctly because I can scroll through it via the slider and see the pictures. I even can watch several movies but as soon as I want to watch a movie a second time this issue occu开发者_如何学运维res. Does anybody know how to fix the problem??
Thanks Björn
This happened some time ago to me. The problem was not releasing all the view controllers responsible for the video. The unreleased controller seems to hold some kind of lock on the hardware and prevents other videos from playback. IIRC the SDK documentation mentions being able to play only one video at the time.
See if you have this in the debugger:
#0 0x97a31142 in semaphore_wait_signal_trap ()
#1 0x97a36c46 in pthread_mutex_lock ()
#2 0x053e80a1 in itemasync_Invalidate ()
#3 0x04d3b12b in -[AVPlaybackItem dealloc] ()
#4 0x04d3a9f6 in -[AVPlaybackItem release] ()
#5 0x011c2a6c in CFRelease ()
I am having this problem when I play a video repeatedly. I think the answer not releasing all the view controllers
精彩评论