[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Review for audio sync patch (D16067)
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2018-10-10 8:32:10
Message-ID: f685f094-1005-fabc-4094-a7134df03e7c () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi, Jouni!

While Phabricator is down I'll post the review here :)

I have tested the patch and it has at least two regressions:

1) It crashes when there is no audio attached (see a patch in 
attachement that should fix that):
2) When in drop frames mode, the video does not always cycle in the end 
of the clip. Basically, sometimes video just "jumps over" the end of the 
selection or the clip range. To test that you can do the following:

i) create a big image (with or without sound)
ii) select several frames, e.g. 5-30th frames
iii) start play
iv) playback will jump over the 30th frame and will continue to the infinity


-- 
Dmitry Kazakov


[Attachment #5 (text/html)]

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font size="-1">Hi, Jouni!<br>
      <br>
      While Phabricator is down I'll post the review here :)<br>
      <br>
      I have tested the patch and it has at least two regressions:<br>
      <br>
      1) It crashes when there is no audio attached (see a patch in
      attachement that should fix that):<br>
      2) When in drop frames mode, the video does not always cycle in
      the end of the clip. Basically, sometimes video just "jumps over"
      the end of the selection or the clip range. To test that you can
      do the following:<br>
      <br>
      i) create a big image (with or without sound)<br>
      ii) select several frames, e.g. 5-30th frames<br>
      iii) start play<br>
      iv) playback will jump over the 30th frame and will continue to
      the infinity<br>
      <br>
      <br>
    </font>
    <pre class="moz-signature" cols="72">-- 
Dmitry Kazakov</pre>
  </body>
</html>

["animation-no-audio-crash-fix.diff" (text/x-patch)]

diff --git a/libs/ui/canvas/kis_animation_player.cpp \
b/libs/ui/canvas/kis_animation_player.cpp index 2f98daa..0eebfa0 100644
--- a/libs/ui/canvas/kis_animation_player.cpp
+++ b/libs/ui/canvas/kis_animation_player.cpp
@@ -448,7 +448,7 @@ void KisAnimationPlayer::uploadFrame(int frame, bool \
forceAudioSync)  const int fps = animationInterface->framerate();
 
     if (frame < 0) {
-        const int currentTime = (m_d->dropFramesMode) ? m_d->syncedAudio->position() \
: m_d->playbackTime.elapsed(); +        const int currentTime = (m_d->dropFramesMode \
&& m_d->syncedAudio) ? m_d->syncedAudio->position() : m_d->playbackTime.elapsed();  \
const int framesDiff = currentTime - m_d->nextFrameExpectedTime;  
         // qDebug() << ppVar(framesDiff)
@@ -472,8 +472,10 @@ void KisAnimationPlayer::uploadFrame(int frame, bool \
forceAudioSync)  
         if (m_d->dropFramesMode) {
             if (m_d->expectedFrame < frame) {
-                // Animation restarting, restart audio as well
-                slotSyncScrubbingAudio(m_d->frameToMSec(frame, fps));
+                if (m_d->syncedAudio) {
+                    // Animation restarting, restart audio as well
+                    slotSyncScrubbingAudio(m_d->frameToMSec(frame, fps));
+                }
                 m_d->lastTimerInterval = m_d->expectedInterval;
                 m_d->nextFrameExpectedTime = currentTime + m_d->expectedInterval;
             } else {



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic