From 51c985616016023ab0078e56c437c59585679c02 Mon Sep 17 00:00:00 2001 From: Karl Blomster Date: Sat, 5 Jul 2008 11:29:42 +0000 Subject: [PATCH] clarified downmixing error in ffmpeg audio provider Originally committed to SVN as r2239. --- aegisub/audio_provider_lavc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aegisub/audio_provider_lavc.cpp b/aegisub/audio_provider_lavc.cpp index f662cb640..c0a902da4 100644 --- a/aegisub/audio_provider_lavc.cpp +++ b/aegisub/audio_provider_lavc.cpp @@ -122,6 +122,10 @@ LAVCAudioProvider::LAVCAudioProvider(Aegisub::String _filename) /* aegisub currently supports mono only, so always resample unless it's mono with the desired samplerate */ if ((sample_rate != codecContext->sample_rate) || (codecContext->channels > 1)) { + // FIXME: ffmpeg currently doesn't support downmixing audio with more than two channels, + // remove the following line when it does. + if (codecContext->channels > 2) + throw _T("ffmpeg audio provider: Downmixing audio with more than two channels is currently not supported by ffmpeg"); rsct = audio_resample_init(1, codecContext->channels, sample_rate, codecContext->sample_rate); if (!rsct) throw _T("ffmpeg audio provider: Failed to initialize resampling");