From 1674a4ec828ebd6822e1d1622d9fcdae5140a61d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 27 Feb 2011 23:26:50 +0100 Subject: output/jack: fix crash with mono playback With mono sound, jack_sample_size is smaller than frame_size (4 vs 2 bytes), and "space/jack_sample_size==0". That means mpd_jack_play() will return 0, although no error has occurred. --- src/output/jack_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/output') diff --git a/src/output/jack_plugin.c b/src/output/jack_plugin.c index 4b71dc8c4..0a0b8377f 100644 --- a/src/output/jack_plugin.c +++ b/src/output/jack_plugin.c @@ -423,7 +423,7 @@ mpd_jack_play(void *data, const void *chunk, size_t size, GError **error) /* send data symmetrically */ space = space1; - if (space >= frame_size) + if (space >= jack_sample_size) break; /* XXX do something more intelligent to -- cgit v1.2.3