[pulseaudio-discuss] [PATCH 1/2] sink-input/source-output: Don't crash when cork() is called without valid sink or source
Tanu Kaskinen
tanuk at iki.fi
Tue Mar 28 19:36:37 UTC 2017
On Sun, 2017-03-26 at 21:40 +0200, Georg Chini wrote:
> If pa_sink_input_cork() or pa_source_output_cork() were called without a sink
> or source attached, the calls would crash pulseaudio.
>
> This patch fixes the problem, so that a source output or sink input can still
> be corked or uncorked while source or sink are invalid. This is needed to
> correct the corking logic in module-loopback.
> ---
> src/modules/echo-cancel/module-echo-cancel.c | 5 ++--
> src/modules/module-equalizer-sink.c | 2 +-
> src/modules/module-ladspa-sink.c | 2 +-
> src/modules/module-loopback.c | 5 ++--
> src/modules/module-remap-sink.c | 2 +-
> src/modules/module-remap-source.c | 3 +--
> src/modules/module-sine.c | 2 +-
> src/modules/module-suspend-on-idle.c | 4 +--
> src/modules/module-virtual-sink.c | 2 +-
> src/modules/module-virtual-source.c | 5 ++--
> src/modules/module-virtual-surround-sink.c | 2 +-
> src/pulsecore/play-memblockq.c | 2 +-
> src/pulsecore/sink-input.c | 38 +++++++++++++++++++---------
> src/pulsecore/sound-file-stream.c | 2 +-
> src/pulsecore/source-output.c | 24 ++++++++++--------
> 15 files changed, 57 insertions(+), 43 deletions(-)
Looks good to me.
--
Tanu
https://www.patreon.com/tanuk
More information about the pulseaudio-discuss
mailing list