music_pipe: check for partial frames in appended chunk

Added an additional assertion which checks partial frames in the
existing tail chunk.
This commit is contained in:
Max Kellermann 2008-11-13 02:06:52 +01:00
parent df09075afc
commit 1178e485cb

View File

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