mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-03 19:29:51 +01:00
[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`.
This commit is contained in:
parent
6c7b26e13f
commit
374c761e77
@ -52,7 +52,7 @@ def get_versions(downloader=None):
|
|||||||
|
|
||||||
def _determine_executables(self):
|
def _determine_executables(self):
|
||||||
programs = ['avprobe', 'avconv', 'ffmpeg', 'ffprobe']
|
programs = ['avprobe', 'avconv', 'ffmpeg', 'ffprobe']
|
||||||
prefer_ffmpeg = self._downloader.params.get('prefer_ffmpeg', False)
|
prefer_ffmpeg = False
|
||||||
|
|
||||||
self.basename = None
|
self.basename = None
|
||||||
self.probe_basename = None
|
self.probe_basename = None
|
||||||
@ -60,6 +60,7 @@ def _determine_executables(self):
|
|||||||
self._paths = None
|
self._paths = None
|
||||||
self._versions = None
|
self._versions = None
|
||||||
if self._downloader:
|
if self._downloader:
|
||||||
|
prefer_ffmpeg = self._downloader.params.get('prefer_ffmpeg', False)
|
||||||
location = self._downloader.params.get('ffmpeg_location')
|
location = self._downloader.params.get('ffmpeg_location')
|
||||||
if location is not None:
|
if location is not None:
|
||||||
if not os.path.exists(location):
|
if not os.path.exists(location):
|
||||||
|
Loading…
Reference in New Issue
Block a user