mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-13 14:37:43 +01:00
[postprocessor/ffmpeg] Fix crash when ffprobe/avprobe are not installed (closes #5349)
'self.probe_basename' was None, so 'probe_executable' raised a KeyError exception
This commit is contained in:
parent
4bbeb19fc7
commit
3da4b31359
@ -116,6 +116,10 @@ def available(self):
|
||||
def executable(self):
|
||||
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 @@ def __init__(self, downloader=None, preferredcodec=None, preferredquality=None,
|
||||
|
||||
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 = [
|
||||
|
Loading…
Reference in New Issue
Block a user