aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorJuan M Martínez <joksnet@gmail.com>2015-12-09 20:56:00 -0300
committerJuan M Martínez <joksnet@gmail.com>2015-12-09 20:56:00 -0300
commit374c761e77b09b07918f525ad74724650309015f (patch)
tree2abe0ac7199fe2594376c62bd3d084d4e1413346 /youtube_dl
parent6c7b26e13f1aebe7bd19a7899b01e49b052febe5 (diff)
[FFmpegPostProcessor] Default of prefer ffmpeg
When no `downloader` is passed to `FFmpegPostProcessor` an exception was raised trying to get the prefer ffmpeg param. AttributeError: 'NoneType' object has no attribute 'params' This fixes and defaults to `False`.
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/postprocessor/ffmpeg.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py
index 5ed723bc6..daca5d814 100644
--- a/youtube_dl/postprocessor/ffmpeg.py
+++ b/youtube_dl/postprocessor/ffmpeg.py
@@ -52,7 +52,7 @@ class FFmpegPostProcessor(PostProcessor):
def _determine_executables(self):
programs = ['avprobe', 'avconv', 'ffmpeg', 'ffprobe']
- prefer_ffmpeg = self._downloader.params.get('prefer_ffmpeg', False)
+ prefer_ffmpeg = False
self.basename = None
self.probe_basename = None
@@ -60,6 +60,7 @@ class FFmpegPostProcessor(PostProcessor):
self._paths = None
self._versions = None
if self._downloader:
+ prefer_ffmpeg = self._downloader.params.get('prefer_ffmpeg', False)
location = self._downloader.params.get('ffmpeg_location')
if location is not None:
if not os.path.exists(location):