Skip to content

Commit

Permalink
Consider the offset in receive buffer size assert
Browse files Browse the repository at this point in the history
  • Loading branch information
robbert-vdh committed Dec 16, 2022
1 parent 78f5252 commit 755a4a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/bufferscalers/enginebufferscalerubberband.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ SINT EngineBufferScaleRubberBand::retrieveAndDeinterleave(
frame_offset += drop_num_frames;
}

DEBUG_ASSERT(received_frames <= static_cast<ssize_t>(m_buffers[0].size()));
DEBUG_ASSERT((received_frames + frame_offset) <= static_cast<ssize_t>(m_buffers[0].size()));
SampleUtil::interleaveBuffer(pBuffer,
m_buffers[0].data() + frame_offset,
m_buffers[1].data() + frame_offset,
Expand Down

0 comments on commit 755a4a4

Please sign in to comment.