Commit 1178e485 authored by Max Kellermann's avatar Max Kellermann

music_pipe: check for partial frames in appended chunk

Added an additional assertion which checks partial frames in the existing tail chunk.
parent df09075a
......@@ -190,6 +190,8 @@ tail_chunk(size_t frame_size)
chunk = music_pipe_get_chunk(music_pipe.end);
assert(chunk->length <= sizeof(chunk->data));
assert((chunk->length % frame_size) == 0);
if (chunk->length + frame_size > sizeof(chunk->data)) {
/* this chunk is full; allocate a new chunk */
next = successor(music_pipe.end);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment