mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
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
This commit is contained in:
parent
3193f6a2c4
commit
76e2cec9a2
1 changed files with 1 additions and 1 deletions
|
|
@ -113,7 +113,7 @@ pa_memchunk * pa_lfe_filter_process(pa_lfe_filter_t *f, pa_memchunk *buf) {
|
||||||
struct saved_state *s, *s2;
|
struct saved_state *s, *s2;
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
if (!f->active)
|
if (!f->active || !buf->length)
|
||||||
return buf;
|
return buf;
|
||||||
|
|
||||||
/* Remove old states (FIXME: we could do better than searching the entire array here?) */
|
/* Remove old states (FIXME: we could do better than searching the entire array here?) */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue