瀏覽代碼

[ffmpeg] Call encodeFilename on filenames

Philipp Hagemeister 10 年之前
父節點
當前提交
52afb2ac1b
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      youtube_dl/postprocessor/ffmpeg.py

+ 3 - 2
youtube_dl/postprocessor/ffmpeg.py

@@ -82,7 +82,8 @@ class FFmpegPostProcessor(PostProcessor):
     def run_ffmpeg_multiple_files(self, input_paths, out_path, opts):
     def run_ffmpeg_multiple_files(self, input_paths, out_path, opts):
         self.check_version()
         self.check_version()
 
 
-        oldest_mtime = min(os.stat(path).st_mtime for path in input_paths)
+        oldest_mtime = min(
+            os.stat(encodeFilename(path)).st_mtime for path in input_paths)
 
 
         files_cmd = []
         files_cmd = []
         for path in input_paths:
         for path in input_paths:
@@ -100,7 +101,7 @@ class FFmpegPostProcessor(PostProcessor):
             stderr = stderr.decode('utf-8', 'replace')
             stderr = stderr.decode('utf-8', 'replace')
             msg = stderr.strip().split('\n')[-1]
             msg = stderr.strip().split('\n')[-1]
             raise FFmpegPostProcessorError(msg)
             raise FFmpegPostProcessorError(msg)
-        os.utime(out_path, (oldest_mtime, oldest_mtime))
+        os.utime(encodeFilename(out_path), (oldest_mtime, oldest_mtime))
         if self._deletetempfiles:
         if self._deletetempfiles:
             for ipath in input_paths:
             for ipath in input_paths:
                 os.remove(ipath)
                 os.remove(ipath)