From a7b0cfccb45b56f493e3ce6fb38e6b23b14518ee Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Thu, 26 Feb 2009 21:02:39 +0100
Subject: output_thread: use the right audio_format in assert()

ao_play() gets PCM data in the in_audio_format, and converts it to
out_audio_format.  Comparing the input data with out_audio_format is
wrong.

prefixed with "STG:" will be automatically removed.  STG: Trailing
empty lines will be automatically removed.  STG: vi: set textwidth=75
filetype=diff nobackup:
---
 src/output_thread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/output_thread.c b/src/output_thread.c
index 2640adfbd..91fd8d406 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -58,7 +58,7 @@ static void ao_play(struct audio_output *ao)
 	size_t size = ao->args.play.size;
 
 	assert(size > 0);
-	assert(size % audio_format_frame_size(&ao->out_audio_format) == 0);
+	assert(size % audio_format_frame_size(&ao->in_audio_format) == 0);
 
 	if (!audio_format_equals(&ao->in_audio_format, &ao->out_audio_format)) {
 		data = pcm_convert(&ao->convert_state,
-- 
cgit v1.2.3