AVPlayer crashes after multiple playbacks-

前端 未结 2 1637
面向向阳花
面向向阳花 2021-02-05 16:35

I\'m trying to create an app which plays videos from a file using AVFoundation. The videos are shown in a view accessed by tapping on a row in a parent tableview.

2条回答
  •  暖寄归人
    2021-02-05 16:47

    May be you leave your videoView retained in some place? Because if you do, your avPlayerItem and avPlayer stay alive and according to this topic you came up to iOS limitation for "render pipeline" with 4 videos staying in memory.

    Remember that setting var to nil does not actually release underlying object. So your

    videoView = nil;
    

    can have zero effect.

提交回复
热议问题