title: Playing an AVMutableComposition with AVPlayer audio gets out of sync
body: <p>I have an AVMutableComposition with 2 audio tracks and one video track. I'm using the composition to string about 40 different video clips from .mov files, putting the video content of each clip in the video track of my composition and the audio in the audio track. The second audio track I use for music.
  I also have a synchronized layer for titles graphics.</p>
  
  <p>When I play this composition using an AVPlayer, the audio slowly gets out of sync. It takes about 4 minutes to start becoming noticeable. It seems like if I only string together a handfull of longer clips the problem is not as apparent, it is when there are many clips shorter clips (~40 in my test) that it gets really bad.</p>
  
  <p>Pausing and Playing doesn't re-sync the audio, however seeking does. In other words, if I let the video play to the end, towards the end the lip sync gets noticeably off even if I pause and play throughout, however, if I seek to a time towards the end the audio gets back in sync.</p>
  
  <p>My hacky solution for now is to seek to the currentTime + 1 frame every minute or so. This creates an unpleasant jump in the video caused by a lag in the seek operation, so not a good solution.</p>
  
  <p>Exporting with an ExportSession doesn't present this problem, audio remains in sync in the output movie.</p>
  
  <p>I'm wondering if the new masterClock property in the AVPlayer is the answer to this, and if it is, how is it used? </p>