aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortassaron2017-07-13 19:31:00 -0400
committertassaron2017-07-13 19:31:00 -0400
commitd7b678f66d1bb1d5c7ccbbf0c8871b66cc1f8750 (patch)
tree576ec1cfa88042c1a46e27e2fad6852b044681d5 /src
parent06c27a48bc3f52e15c15445d822e8a6f523ab98f (diff)
staticComponents list is reversed now
Diffstat (limited to 'src')
-rw-r--r--src/core.py8
-rw-r--r--src/video_thread.py10
2 files changed, 9 insertions, 9 deletions
diff --git a/src/core.py b/src/core.py
index d72760d..3f0a6ad 100644
--- a/src/core.py
+++ b/src/core.py
@@ -527,20 +527,20 @@ class Core:
]
if extraAudio:
unwantedVideoStreams = []
- for compNo, params in enumerate(extraAudio):
+ for streamNo, params in enumerate(extraAudio):
extraInputFile, params = params
ffmpegCommand.extend([
'-i', extraInputFile
])
if 'map' in params and params['map'] == '-v':
# a video stream to remove
- unwantedVideoStreams.append(compNo + 1)
+ unwantedVideoStreams.append(streamNo + 1)
if unwantedVideoStreams:
ffmpegCommand.extend(['-map', '0'])
- for compNo in unwantedVideoStreams:
+ for streamNo in unwantedVideoStreams:
ffmpegCommand.extend([
- '-map', '-%s:v' % str(compNo)
+ '-map', '-%s:v' % str(streamNo)
])
ffmpegCommand.extend([
'-filter_complex',
diff --git a/src/video_thread.py b/src/video_thread.py
index 9ce9cc8..b0562db 100644
--- a/src/video_thread.py
+++ b/src/video_thread.py
@@ -54,18 +54,18 @@ class Worker(QtCore.QObject):
audioI = self.compositeQueue.get()
bgI = int(audioI / self.sampleSize)
frame = None
-
for compNo, comp in reversed(list(enumerate(self.components))):
- if compNo in self.staticComponents:
- if self.staticComponents[compNo] is None:
+ layerNo = len(self.components) - compNo
+ if layerNo in self.staticComponents:
+ if self.staticComponents[layerNo] is None:
# this layer was merged into a following layer
continue
# static component
if frame is None: # bottom-most layer
- frame = self.staticComponents[compNo]
+ frame = self.staticComponents[layerNo]
else:
frame = Image.alpha_composite(
- frame, self.staticComponents[compNo]
+ frame, self.staticComponents[layerNo]
)
else:
# animated component