Commit 1674a4ec authored by Max Kellermann's avatar Max Kellermann

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.
parent ce370bee
ver 0.15.16 (2010/??/??)
* output:
- ao: initialize the ao_sample_format struct
- jack: fix crash with mono playback
* encoders:
- lame: explicitly configure the output sample rate
* update: log all file permission problems
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment