[ffmpeg] check for - file name in _ffmpeg_filename_argument

This commit is contained in:
remitamine 2016-04-16 19:45:56 +01:00
parent ce599d5a7e
commit d868f43c58
2 changed files with 2 additions and 5 deletions

View File

@ -235,10 +235,7 @@ def _call_downloader(self, tmpfilename, info_dict):
args += ['-f', EXT_TO_OUT_FORMATS.get(info_dict['ext'], info_dict['ext'])] args += ['-f', EXT_TO_OUT_FORMATS.get(info_dict['ext'], info_dict['ext'])]
args = [encodeArgument(opt) for opt in args] args = [encodeArgument(opt) for opt in args]
if tmpfilename == '-': args.append(encodeFilename(ffpp._ffmpeg_filename_argument(tmpfilename), True))
args.append('pipe:1')
else:
args.append(encodeFilename(ffpp._ffmpeg_filename_argument(tmpfilename), True))
self._debug_cmd(args) self._debug_cmd(args)

View File

@ -175,7 +175,7 @@ def _ffmpeg_filename_argument(self, fn):
# Always use 'file:' because the filename may contain ':' (ffmpeg # Always use 'file:' because the filename may contain ':' (ffmpeg
# interprets that as a protocol) or can start with '-' (-- is broken in # interprets that as a protocol) or can start with '-' (-- is broken in
# ffmpeg, see https://ffmpeg.org/trac/ffmpeg/ticket/2127 for details) # ffmpeg, see https://ffmpeg.org/trac/ffmpeg/ticket/2127 for details)
return 'file:' + fn return 'file:' + fn if fn != '-' else fn
class FFmpegExtractAudioPP(FFmpegPostProcessor): class FFmpegExtractAudioPP(FFmpegPostProcessor):