]> git.nihav.org Git - nihav.git/commitdiff
binkaudio: fix channelmap
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 31 Jan 2019 13:07:54 +0000 (14:07 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 31 Jan 2019 13:07:54 +0000 (14:07 +0100)
nihav-rad/src/codecs/binkaud.rs

index 05440190008cd533efb394ad4841cd2287045801..ed4c32aa1ecb216cdbdb8375a467a7c1b3f201c5 100644 (file)
@@ -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;