1
0
Fork 0

Fix segfault when stereo downmixing

This commit is contained in:
arch1t3cht 2022-07-30 00:45:49 +02:00
parent f06e42a82e
commit aeaab655eb
1 changed files with 1 additions and 1 deletions

View File

@ -175,7 +175,7 @@ void FFmpegSourceAudioProvider::LoadAudio(agi::fs::path const& filename) {
// Might fail if FFMS2 wasn't built with libavresample
if (!FFMS_SetOutputFormatA(AudioSource, opt.get(), nullptr)) {
channels = 1;
channels = channels > 2 ? 2 : channels;
bytes_per_sample = 2;
float_samples = false;
}