Skip to content

Commit

Permalink
fix pausing
Browse files Browse the repository at this point in the history
  • Loading branch information
TNTwise committed Sep 26, 2024
1 parent 913c36e commit 46978f8
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions backend/src/RenderVideo.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,22 +178,22 @@ def onEndOfInterpolateCall(self):
self.copyFrame(self.encodedFrame0,self.encodedFrame1)

def renderInterpolate(self, frame, transition=False):

if self.setupFrame0 is None:
self.i0Norm(frame)
return
self.i1Norm(frame)

for n in range(self.ceilInterpolateFactor - 1):
if not transition:
timestep = (n + 1) * 1.0 / (self.ceilInterpolateFactor)
if self.doEncodingOnFrame:
frame = self.interpolate(img0=self.setupFrame0, img1=self.setupFrame1, timestep=timestep, f0encode=self.encodedFrame0, f1encode=self.encodedFrame1)
else:
frame = self.interpolate(img0=self.setupFrame0, img1=self.setupFrame1, timestep=timestep)
self.writeQueue.put(frame)
if frame is not None:
if self.setupFrame0 is None:
self.i0Norm(frame)
return
self.i1Norm(frame)
for n in range(self.ceilInterpolateFactor - 1):
if not transition:
timestep = (n + 1) * 1.0 / (self.ceilInterpolateFactor)
if self.doEncodingOnFrame:
frame = self.interpolate(img0=self.setupFrame0, img1=self.setupFrame1, timestep=timestep, f0encode=self.encodedFrame0, f1encode=self.encodedFrame1)
else:
frame = self.interpolate(img0=self.setupFrame0, img1=self.setupFrame1, timestep=timestep)
self.writeQueue.put(frame)

self.onEndOfInterpolateCall()
self.onEndOfInterpolateCall()



Expand Down

0 comments on commit 46978f8

Please sign in to comment.