output/alsa: add full check before calling FillWithSilence()

This commit is contained in:
Max Kellermann
2019-06-27 21:20:38 +02:00
parent 8f6c750064
commit 549faa8a9c
2 changed files with 3 additions and 1 deletions

View File

@@ -123,6 +123,8 @@ public:
*/
void FillWithSilence(const uint8_t *_silence,
const size_t frame_size) noexcept {
assert(!IsFull());
size_t partial_frame = tail % frame_size;
auto *dest = GetTail() - partial_frame;