1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-25 19:52:11 +00:00

[youtube] Use the existing w and h variables

This commit is contained in:
Lukáš Lalinský 2015-11-28 08:16:46 +01:00
parent 313dfc45f5
commit 41f24c321d

View file

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