aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-27 09:44:55 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-27 09:44:55 +0000
commita8baceeb2ddf54c346becea38fcd2bd0a4193f31 (patch)
tree82423f4cb3d3d75999bf39cf35cbdfe1c64a9949
parentb2a22b243560dbcf147b55328f2d5f59602778e6 (diff)
downloadusdx-a8baceeb2ddf54c346becea38fcd2bd0a4193f31.tar.gz
usdx-a8baceeb2ddf54c346becea38fcd2bd0a4193f31.tar.xz
usdx-a8baceeb2ddf54c346becea38fcd2bd0a4193f31.zip
FFmpeg is very verbose and shows a bunch of errors.
Those errors (they can be considered as warnings by us) can be ignored as they do not give any useful information. There is no solution to fix this except for turning error-messages off. They can be enabled if EnableFFmpegErrorOutput (in UAudioDecoder_FFMpeg) is defined (undefined by default). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1294 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--Game/Code/Classes/UAudioDecoder_FFMpeg.pas22
1 files changed, 22 insertions, 0 deletions
diff --git a/Game/Code/Classes/UAudioDecoder_FFMpeg.pas b/Game/Code/Classes/UAudioDecoder_FFMpeg.pas
index a9c5863b..e81acf80 100644
--- a/Game/Code/Classes/UAudioDecoder_FFMpeg.pas
+++ b/Game/Code/Classes/UAudioDecoder_FFMpeg.pas
@@ -21,6 +21,12 @@ interface
{.$DEFINE DebugFFMpegDecode}
+// FFmpeg is very verbose and shows a bunch of errors.
+// Those errors (they can be considered as warnings by us) can be ignored
+// as they do not give any useful information.
+// There is no solution to fix this except for turning them off.
+{.$DEFINE EnableFFmpegErrorOutput}
+
implementation
uses
@@ -1060,6 +1066,22 @@ begin
//Log.LogStatus('InitializeDecoder', 'UAudioDecoder_FFMpeg');
FFMpegCore := TMediaCore_FFMpeg.GetInstance();
av_register_all();
+
+ // Do not show uninformative error messages by default.
+ // FFmpeg prints all error-infos on the console by default what
+ // is very confusing as the playback of the files is correct.
+ // We consider these errors to be internal to FFMpeg. They can be fixed
+ // by the FFmpeg guys only and do not provide any useful information in
+ // respect to USDX.
+ {$IFNDEF EnableFFmpegErrorOutput}
+ {$IF LIBAVUTIL_VERSION_MAJOR >= 50}
+ av_log_set_level(AV_LOG_FATAL);
+ {$ELSE}
+ // FATAL and ERROR share one log-level, so we have to use QUIET
+ av_log_set_level(AV_LOG_QUIET);
+ {$IFEND}
+ {$ENDIF}
+
Result := true;
end;