[pp/ffmpeg] Fix uncaught error if bad --ffmpeg-location is given (#15104)
Revert 9f77e04c76
Closes #12829
Authored by: bashonly
This commit is contained in:
parent
a4c72acc46
commit
0eed3fe530
2 changed files with 6 additions and 1 deletions
|
|
@ -457,6 +457,8 @@ class FFmpegFD(ExternalFD):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def available(cls, path=None):
|
def available(cls, path=None):
|
||||||
|
# TODO: Fix path for ffmpeg
|
||||||
|
# Fixme: This may be wrong when --ffmpeg-location is used
|
||||||
return FFmpegPostProcessor().available
|
return FFmpegPostProcessor().available
|
||||||
|
|
||||||
def on_process_started(self, proc, stdin):
|
def on_process_started(self, proc, stdin):
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,10 @@ class FFmpegPostProcessor(PostProcessor):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def available(self):
|
def available(self):
|
||||||
return bool(self._ffmpeg_location.get()) or self.basename is not None
|
# If we return that ffmpeg is available, then the basename property *must* be run
|
||||||
|
# (as doing so has side effects), and its value can never be None
|
||||||
|
# See: https://github.com/yt-dlp/yt-dlp/issues/12829
|
||||||
|
return self.basename is not None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def executable(self):
|
def executable(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue