[pulseaudio-discuss] [RFC][PATCH] Initialise write_volume callback
Maarten Bosmans
mkbosmans at gmail.com
Sat Aug 13 07:57:36 PDT 2011
Hi list,
I was getting some warnings about possible uninitialised variables in
pulsecore/{source,sink}.c. At first the solution seemed obvious: just
set the callback to NULL in reset_callbacks, as it looks like it was
forgotten to be added there when write_volume was added.
The attached patch does this and indeed solves the warning about
reading from uninitialised memory. But it triggers an assert:
E: sink.c: Assertion 's->write_volume' failed at
pulsecore/sink.c:3353, function pa_sink_volume_change_apply().
Aborting.
This can be worked around by not adding the line "s->write_volume =
NULL" to reset_callbacks(), but do after reset_callbacks() is called
in pa_sink_new() and not adding it at the other place
reset_callbacks() is called, pa_sink_unlink().
However adding the initialisatino to reset_callbacks seems better to
me. Does anyone have a suggestion how to fix this?
Maarten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Initialise-write_volume.patch
Type: application/octet-stream
Size: 1134 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110813/92396ebf/attachment.obj>
More information about the pulseaudio-discuss
mailing list