aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-01-30 01:47:46 +0600
committerSergey M․ <dstftw@gmail.com>2016-01-30 01:47:46 +0600
commit350cf045d8f86497e8d79ae193b40cc44c8e670c (patch)
treeb5bc34fdcc1541dc900ff02114cafca1f22883f8 /youtube_dl/extractor
parent68a0ea15b4c20ed0174a82ee79a6d3c3474b0f69 (diff)
[extractor/common] Restrict checks when auto calculating tbr
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 33290fd74..b3d57dfce 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -828,7 +828,7 @@ class InfoExtractor(object):
for f in formats:
# Automatically determine tbr when missing based on abr and vbr (improves
# formats sorting in some cases)
- if 'tbr' not in f and 'abr' in f and 'vbr' in f:
+ if 'tbr' not in f and f.get('abr') is not None and f.get('vbr') is not None:
f['tbr'] = f['abr'] + f['vbr']
def _formats_key(f):