From ef1d2014441deb8c142ecce64fbed2ca0958f1b5 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Thu, 31 Jan 2019 14:07:54 +0100 Subject: [PATCH] binkaudio: fix channelmap --- nihav-rad/src/codecs/binkaud.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nihav-rad/src/codecs/binkaud.rs b/nihav-rad/src/codecs/binkaud.rs index 0544019..ed4c32a 100644 --- a/nihav-rad/src/codecs/binkaud.rs +++ b/nihav-rad/src/codecs/binkaud.rs @@ -184,7 +184,7 @@ impl NADecoder for BinkAudioDecoder { let channels = ainfo.get_channels(); validate!(channels <= 2); self.ainfo = NAAudioInfo::new(srate, channels, SND_F32P_FORMAT, 2); - self.chmap = NAChannelMap::from_str("L,R").unwrap(); + self.chmap = NAChannelMap::from_str(if channels == 2 {"L,R"} else {"C"}).unwrap(); if let Some(ref edata) = info.get_extradata() { if edata.as_slice() == b"BIKb" { self.version_b = true; -- 2.39.5