projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13a9b69
)
[youtube] Clarify rationale for yt:stretch validation
author
Sergey M․
<dstftw@gmail.com>
Sat, 28 Nov 2015 12:50:21 +0000
(18:50 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 28 Nov 2015 12:50:21 +0000
(18:50 +0600)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 9da8d4bc532e006d263c77b14a004289b635adaa..1c2420a331481eed04ceb5317984b6d59b6dbf81 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-1514,6
+1514,8
@@
class YoutubeIE(YoutubeBaseInfoExtractor):
if stretched_m:
w = float(stretched_m.group('w'))
h = float(stretched_m.group('h'))
+ # yt:stretch may hold invalid ratio data (e.g. for Q39EVAstoRM ratio is 17:0).
+ # We will only process correct ratios.
if w > 0 and h > 0:
ratio = w / h
for f in formats: