aboutsummaryrefslogtreecommitdiffstats
path: root/utils/uhjdecoder.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-03-21 12:36:56 -0700
committerChris Robinson <[email protected]>2021-03-21 12:36:56 -0700
commitb8ede345f3c3e53446f5fd03b3c70293a2eb4a8a (patch)
treee2c85f0dca27910d61f633550118453f520655db /utils/uhjdecoder.cpp
parentc3ee678945872bd895cf4bc3437bd166d0c3b3b6 (diff)
Don't assume two input channels in uhjdecoder
Diffstat (limited to 'utils/uhjdecoder.cpp')
-rw-r--r--utils/uhjdecoder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/uhjdecoder.cpp b/utils/uhjdecoder.cpp
index 3de2e40a..f9d58b2e 100644
--- a/utils/uhjdecoder.cpp
+++ b/utils/uhjdecoder.cpp
@@ -471,7 +471,7 @@ int main(int argc, char **argv)
if(sgot < BufferLineSize)
{
const sf_count_t remaining{std::min(BufferLineSize - sgot, LeadOut)};
- std::fill_n(inmem.get() + sgot*2, remaining*2, 0.0f);
+ std::fill_n(inmem.get() + sgot*ininfo.channels, remaining*ininfo.channels, 0.0f);
sgot += remaining;
LeadOut -= remaining;
}