[postprocessor/ffmpeg] Extract `check_outdated` method
authorSergey M․ <dstftw@gmail.com>
Sun, 10 May 2015 18:26:39 +0000 (00:26 +0600)
committerSergey M․ <dstftw@gmail.com>
Sun, 10 May 2015 18:26:39 +0000 (00:26 +0600)
youtube_dl/postprocessor/ffmpeg.py

index 214de39f9aa80e6f042b63e2069ded1ab6d123bd..211faf69a6cfd6135416fb524ffb13e199cc4941 100644 (file)
@@ -36,7 +36,9 @@ class FFmpegPostProcessor(PostProcessor):
     def check_version(self):
         if not self.available:
             raise FFmpegPostProcessorError('ffmpeg or avconv not found. Please install one.')
+        self.check_outdated()
 
+    def check_outdated(self):
         required_version = '10-0' if self.basename == 'avconv' else '1.0'
         if is_outdated_version(
                 self._versions[self.basename], required_version):
@@ -44,6 +46,8 @@ class FFmpegPostProcessor(PostProcessor):
                 self.basename, self.basename, required_version)
             if self._downloader:
                 self._downloader.report_warning(warning)
+            return True
+        return False
 
     @staticmethod
     def get_versions(downloader=None):