• Max Kellermann's avatar
    output/alsa: check ring buffer space before writing to it · 0a32634d
    Max Kellermann authored
    Pass only the amount of data to PcmExport::Export() when its full
    output fits into the ring buffer.  Using only a part of the
    PcmExport::Export() result may cause data corruption because
    PcmExport's internal state may contain partial blocks which would need
    to be rolled back when only some of its output data was used.
    
    As a side effect, this fixes an assertion failure because
    PcmExport::CalcInputSize() considered partial block data and could
    cause Play() to return a number larger than the "size" parameter.
    0a32634d
Name
Last commit
Last update
.github/ISSUE_TEMPLATE Loading commit data...
android Loading commit data...
build Loading commit data...
doc Loading commit data...
python/build Loading commit data...
src Loading commit data...
systemd Loading commit data...
test Loading commit data...
win32 Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
NEWS Loading commit data...
README.md Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...
mpd.svg Loading commit data...
valgrind.suppressions Loading commit data...