Driver: Fix slot length check on packet passthrough (#231)

Corrects a buffer length check identified in #230 which was reversed,
such that overly large Opus packets would panic on a subsequent
`write_all`.
This commit is contained in:
Kyle Simpson
2024-03-04 08:59:25 +00:00
committed by GitHub
parent 8f60cf573e
commit 58f5c89f92

View File

@@ -77,7 +77,7 @@ pub fn mix_symph_indiv(
// seen. The main one is that most Opus tracks end on a sub-20ms
// frame, particularly on Youtube.
// However, a frame that's bigger than the target buffer is an instant block.
let buf_size_fatal = buf.len() <= slot.len();
let buf_size_fatal = buf.len() >= slot.len();
if match sample_ct {
Ok(MONO_FRAME_SIZE) => true,