Skip to content

fallbackswitch: Move active_sinkpad out of State into its own Mutex

As described in issue #200 (closed), we hold the srcpad's stream lock in some situations where we notify the active-pad property.

If there's a handler installed it will most likely attempt to read the property, which had to take the state lock. Another thread could already be holding this lock and attempting to obtain the srcpad's stream lock. This resulted in a deadlock.

To avoid this, move the active_sinkpad field into its own Mutex, which we never hold for long.

Fixes: #200 (closed)

Merge request reports

Loading