summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/flufigut.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/flufigut.py b/src/flufigut.py
index 4007e4f..d8cbaa9 100755
--- a/src/flufigut.py
+++ b/src/flufigut.py
@@ -120,8 +120,15 @@ for property in input.keys():
elif property != 'source':
flow['input']['raw-input']['properties'][property] = input[property]
+
+samplerates = [ ]
resolutions = [ ]
for format in transcode.keys():
+ if 'samplerate' in globals['formats'][format]:
+ samplerate = globals['formats'][format]['samplerate']
+ if samplerate not in samplerates:
+ if input['samplerate'] != samplerate:
+ samplerates.append(samplerate)
for profile in transcode[format]:
resolution = globals['profiles'][profile]['video']
if resolution not in resolutions:
@@ -143,15 +150,6 @@ for resolution in resolutions:
},
}
-
-samplerates = [ ]
-for format in globals['formats'].keys():
- if 'samplerate' in globals['formats'][format]:
- samplerate = globals['formats'][format]['samplerate']
- if samplerate not in samplerates:
- if input['samplerate'] != samplerate:
- samplerates.append(samplerate)
-
for samplerate in samplerates:
flow['input']['resample-%s' % samplerate] = {
'type': 'audio-resample',