Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay in media object causes slight glitch in looped video #3

Open
mdejong opened this issue Mar 18, 2013 · 0 comments
Open

Delay in media object causes slight glitch in looped video #3

mdejong opened this issue Mar 18, 2013 · 0 comments

Comments

@mdejong
Copy link
Owner

mdejong commented Mar 18, 2013

This patch needs to be evaluated in terms of how it impacts looping with audio. The audio needs to stop before the next loop otherwise audio playback fails. But, the artificial delay means that there is a slight visual glitch in a looping video with no audio. This change needs to not reintroduce the problem with the audio playback.

diff --git a/Classes/AVAnimator/AVAnimatorMedia.m b/Classes/AVAnimator/AVAnimatorMedia.m
index cde252f..32a8401 100644
--- a/Classes/AVAnimator/AVAnimatorMedia.m
+++ b/Classes/AVAnimator/AVAnimatorMedia.m
@@ -631,11 +631,14 @@
NSAssert(self.currentFrame == 0, @"currentFrame must be zero");

// Schedule delayed start callback to start audio playback and kick

  • // off decode callback cycle.
  • // off decode callback cycle. This callback is scheduled so that
  • // the event loop is entered again, but note the 0.0 delay, we do
  • // not want to introduce an issue with a slight delay appearing
  • // at the end of an animation cycle.

[self.animatorDecodeTimer invalidate];

  •   self.animatorDecodeTimer = [NSTimer timerWithTimeInterval: 0.01
    
  •   self.animatorDecodeTimer = [NSTimer timerWithTimeInterval: 0.0
                                                  target: self
                                                selector: @selector(_delayedStartAnimator:)
                                                userInfo: NULL
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant