lfe-filter: Deal with empty input chunks
authorArun Raghavan <git@arunraghavan.net>
Thu, 17 Sep 2015 04:14:49 +0000 (09:44 +0530)
committerDavid Henningsson <david.henningsson@canonical.com>
Thu, 17 Sep 2015 06:10:44 +0000 (08:10 +0200)
commit76e2cec9a2c3a09fc62ce62042d33375d9878471
tree6283d11da53bb411a5a72deddfdfba754b695839
parent3193f6a2c459948a997a0de57778a8a2bf599436
lfe-filter: Deal with empty input chunks

It is possible that we get a zero-length memchunk to work with.
Specifically, this happens the resampler (which is called before the
lfe-filter) consumes all the input data, but does not (yet) produce any
output data.

Reproduced using:

  pulseaudio --resample-method=soxr-mq
  pactl load-module module-null-sink sink_name=lfe_test channels=3 channel_map=front-left,front-right,lfe
  paplay --raw /dev/zero --rate=48000 -d lfe_test

Thanks to the original reporter for the backtrace:

Bug: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1496577
src/pulsecore/filter/lfe-filter.c