]> git.nihav.org Git - nihav.git/commitdiff
nihav_llaudio/demuxers/wavpack: set actual format instead of the default one
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 2 Feb 2026 19:40:07 +0000 (20:40 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 2 Feb 2026 19:40:07 +0000 (20:40 +0100)
nihav-llaudio/src/demuxers/wavpack.rs

index 6b95dcce2f9467f280a5dcb31f8e0bb4d7dfb90b..9ceaf25afd49dad03da42c9add240d60fb85b113 100644 (file)
@@ -172,7 +172,7 @@ impl<'a> DemuxCore<'a> for WavPackDemuxer<'a> {
             fmt.bits = (((hdr.flags & 3) + 1) * 8) as u8;
         }
 
-        let ahdr = NAAudioInfo::new(srate, channels, SND_S16P_FORMAT, 1);
+        let ahdr = NAAudioInfo::new(srate, channels, fmt, 1);
         let ainfo = NACodecInfo::new("wavpack", NACodecTypeInfo::Audio(ahdr), Some(buf.clone()));
         strmgr.add_stream(NAStream::new(StreamType::Audio, 0, ainfo, 1, srate, hdr.tot_samples)).unwrap();
         seek_index.mode = SeekIndexMode::Automatic;