output/alsa: copy the PcmExport result to the ring_buffer

.. and not the input data.

Regression from commit b1c7649edb (integer underflow).

 https://bugs.musicpd.org/view.php?id=4639
This commit is contained in:
Max Kellermann 2017-02-10 22:23:00 +01:00
parent de80c270bd
commit 4a80e9cb25

View File

@ -1201,8 +1201,8 @@ AlsaOutput::Play(const void *chunk, size_t size)
if (error) if (error)
std::rethrow_exception(error); std::rethrow_exception(error);
size_t bytes_written = ring_buffer->push((const uint8_t *)chunk, size_t bytes_written = ring_buffer->push((const uint8_t *)e.data,
size); e.size);
if (bytes_written > 0) if (bytes_written > 0)
return pcm_export->CalcSourceSize(bytes_written); return pcm_export->CalcSourceSize(bytes_written);