[youtube] Use the existing `w` and `h` variables

pull/8/head
Lukáš Lalinský 2015-11-28 08:16:46 +01:00
rodzic 313dfc45f5
commit 41f24c321d
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -1515,7 +1515,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
w = float(stretched_m.group('w'))
h = float(stretched_m.group('h'))
if w > 0 and h > 0:
ratio = float(stretched_m.group('w')) / float(stretched_m.group('h'))
ratio = w / h
for f in formats:
if f.get('vcodec') != 'none':
f['stretched_ratio'] = ratio