Problem with syncing custom audio with video

Hello everybody.
I am writing a video player app with custom audio effects. For effects I’ve written an audio unit. Video playback is handled by AVPlayer with muted audio. The problem is that the two things do not sync: audio is slowly becoming faster then video. Not by much, but it’s noticeable. And when I press pause\play things become completely awful: audio playback continues almost instantly while video playback resumes with significant delay. The same is applicable to rewinding.
Could you please supply me with some ideas about fixing the problem. Maybe there is something else aside AVPlayer that I could use for video playback?
Thank you in advance.