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:
@@ -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
|
||||
|
Reference in New Issue
Block a user