10

I am implementing a video app, that lists video and able to stream or watch local videos. If I try to watch videos with my player that inherits from AVPlayer, a lot of threads initated, after 15-20 times, the system does not alloc the AVPlayer well and, even if I do not get any error, the player view is blank and nothing happening...I need to kill app to restore.

How to deal with it?

Thanks in advance

erdemgc
  • 1,701
  • 3
  • 23
  • 43
  • Can you share some code? – rocky Oct 08 '15 at 00:43
  • This has been bugging me so much lately, I'm looking into it now, and will post something as soon as I find a solution. – jay Oct 21 '15 at 21:48
  • did you find any solution with this @jay ? – jjjjjjjj Mar 31 '16 at 04:28
  • 2
    I have similar trouble. When setup video, and its play well, there creating "com.apple.coremedia.player.async" thread. And if these thread count become 15+ the video don't appear. Its seems to be a limitation for AVPlayer or AVPlayerLayer. I'm also trying to figure out how correct dealloc those players. Did you find some solution? – Mr.Fingers Jun 24 '16 at 08:06

1 Answers1

2

I had the same issue, in my case the AVPlayerLayer didn’t get DE allocated successfully because somehow a custom label grabbed the strong reference of controller and the controller did not get DE allocated. 

Implement


deinit {

}



in your controller and check this called or not. If not you have the solution. 
I hope this helps.

Nouman
  • 105
  • 1
  • 11