aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/postprocessor
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-04-03 14:09:50 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-04-03 14:09:50 +0200
commit3da4b31359c8dbbad3477fbe8341e6fc293cda82 (patch)
treec868c59009f06ae9ccf8769ea93981ff706adef6 /youtube_dl/postprocessor
parent4bbeb19fc77a49af763ce3443293b29b8450d686 (diff)
[postprocessor/ffmpeg] Fix crash when ffprobe/avprobe are not installed (closes #5349)
'self.probe_basename' was None, so 'probe_executable' raised a KeyError exception
Diffstat (limited to 'youtube_dl/postprocessor')
-rw-r--r--youtube_dl/postprocessor/ffmpeg.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py
index 55adf9685..0b60ac7e7 100644
--- a/youtube_dl/postprocessor/ffmpeg.py
+++ b/youtube_dl/postprocessor/ffmpeg.py
@@ -117,6 +117,10 @@ class FFmpegPostProcessor(PostProcessor):
return self._paths[self.basename]
@property
+ def probe_available(self):
+ return self.probe_basename is not None
+
+ @property
def probe_executable(self):
return self._paths[self.probe_basename]
@@ -168,7 +172,7 @@ class FFmpegExtractAudioPP(FFmpegPostProcessor):
def get_audio_codec(self, path):
- if not self.probe_executable:
+ if not self.probe_available:
raise PostProcessingError('ffprobe or avprobe not found. Please install one.')
try:
cmd = [