From 94d1a87d0432d885756f9d23cfba1f8229cfe453 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 8 Mar 2009 13:45:24 +0100 Subject: music_chunk: added assertions on the audio format In !NDEBUG, remember which audio_format is stored in every chunk and every pipe. Check the audio_format of every new data block appended to the music_chunk, and the format of every new chunk appended to the music_pipe. --- src/player_thread.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/player_thread.c') diff --git a/src/player_thread.c b/src/player_thread.c index bc325ca00..3302e51a9 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -313,6 +313,8 @@ play_chunk(struct song *song, struct music_chunk *chunk, { bool success; + assert(music_chunk_check_format(chunk, format)); + pc.elapsed_time = chunk->times; pc.bit_rate = chunk->bit_rate; -- cgit v1.2.3