1. spirit
  2. vss-plugins

Commits

spirit  committed c44eedd

Action Resync: prevent negative timings if not matches were found.

  • Participants
  • Parent commits 04087ec
  • Branches default

Comments (0)

Files changed (1)

File jsplugin/general/action_resync.js

View file
         if (lastIndex) {
             var result = JSAction_Resync2.findBestDelay(
                 subs.slice(firstIndex, lastIndex), minTiming, searchLimit);
+            if (result.matchCount == 0 && minTiming < 0) {
+                minTiming = 0;
+                result = JSAction_Resync2.findBestDelay(
+                    subs.slice(firstIndex, lastIndex), minTiming, searchLimit);
+            }
             JSAction_Resync2.delaySubs(subs, firstIndex, result);
 
             if (result.matchCount) {