]> code.delx.au - pulseaudio/commit
suspend: Do not assert when checking for device suspended status and a stream is...
authorColin Guthrie <cguthrie@mandriva.org>
Fri, 1 Oct 2010 00:26:43 +0000 (01:26 +0100)
committerColin Guthrie <cguthrie@mandriva.org>
Fri, 1 Oct 2010 00:39:35 +0000 (01:39 +0100)
commitd195a549799743806a62c4f05017b45fd8b51ab0
tree7edc7dbeda375ba8704ee7b8dbf3ae0c0d7e25cb
parentb02abcb61303a571eeec80f7f1917a256d68290f
suspend: Do not assert when checking for device suspended status and a stream is not linked.

When looping through the streams on a given device checking to see if the
stream is 'active' there should be no assert if the stream is not linked, it
should simply be ignored.

This assert can be hit if a sink and a sink input are both created and setup
but the final put calls are left to the end as is done in module-ladspa-sink.

While the order of the calls in module-ladspa-sink could be altered, we should
deal gracefully with the way it is now and not complain about ending up
in this state.

A trigger case was trivial:
 1. Load a ladspa-sink.
 2. Play a stream and move it to it.
 3. Unload the module, then reload it.
 4. Due to module-stream-restore and module-suspend-on-idle, the hook callbacks
    will ultimately hit this assert.

Thanks to Kim Therkelsen for highlighting this issue.
src/pulsecore/sink.c
src/pulsecore/source.c