From: Kostya Shishkov Date: Thu, 31 Jan 2019 13:07:54 +0000 (+0100) Subject: binkaudio: fix channelmap X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=ef1d2014441deb8c142ecce64fbed2ca0958f1b5;p=nihav.git binkaudio: fix channelmap --- 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;