aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/output_thread.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/output_thread.c b/src/output_thread.c
index b65a601a3..c887828bb 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -69,9 +69,17 @@ static void ao_play(struct audio_output *ao)
assert(size > 0);
- if (!audio_format_equals(&ao->inAudioFormat, &ao->outAudioFormat))
+ if (!audio_format_equals(&ao->inAudioFormat, &ao->outAudioFormat)) {
convertAudioFormat(ao, &data, &size);
+ /* under certain circumstances, pcm_convert() may
+ return an empty buffer - this condition should be
+ investigated further, but for now, do this check as
+ a workaround: */
+ if (size == 0)
+ return;
+ }
+
ret = ao->plugin->play(ao->data, data, size);
if (!ret) {
ao->plugin->cancel(ao->data);