aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-08 13:45:24 +0100
committerMax Kellermann <max@duempel.org>2009-03-08 13:45:24 +0100
commit94d1a87d0432d885756f9d23cfba1f8229cfe453 (patch)
tree1c5358045a47e07556c8476cefb8c33181e567fd /src/player_thread.c
parent359f9871b230b0f3e986ea7fb30e93b9730b683b (diff)
downloadmpd-94d1a87d0432d885756f9d23cfba1f8229cfe453.tar.gz
mpd-94d1a87d0432d885756f9d23cfba1f8229cfe453.tar.xz
mpd-94d1a87d0432d885756f9d23cfba1f8229cfe453.zip
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.
Diffstat (limited to '')
-rw-r--r--src/player_thread.c2
1 files changed, 2 insertions, 0 deletions
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;