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:
parent
ce370bee60
commit
1674a4ec82
1
NEWS
1
NEWS
|
@ -1,6 +1,7 @@
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue