Don't assume two input channels in uhjdecoder

This commit is contained in:
Chris Robinson 2021-03-21 12:36:56 -07:00
parent c3ee678945
commit b8ede345f3

View File

@ -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;
}