From: Sergey M․ Date: Sat, 28 Nov 2015 12:50:21 +0000 (+0600) Subject: [youtube] Clarify rationale for yt:stretch validation X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=5faf9fed7e1c7922578467cfd48db5867ef9b91b;p=youtube-dl [youtube] Clarify rationale for yt:stretch validation --- diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 9da8d4bc5..1c2420a33 100644 --- 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: