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.
This commit is contained in:
Max Kellermann
2011-02-27 23:26:50 +01:00
parent ce370bee60
commit 1674a4ec82
2 changed files with 2 additions and 1 deletions

View File

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