webrtcsink: fix tracking of signaller state

For the signaller to get stopped, we need to remember that we started it
in the first place.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1167>
This commit is contained in:
Mathieu Duponchelle 2023-04-08 01:34:07 +02:00 committed by Sebastian Dröge
parent 3368f55a88
commit a455819871

View file

@ -2973,6 +2973,7 @@ impl WebRTCSink {
let signaller = settings.signaller.clone(); let signaller = settings.signaller.clone();
drop(settings); drop(settings);
if state.should_start_signaller(&element) { if state.should_start_signaller(&element) {
state.signaller_state = SignallerState::Started;
drop(state); drop(state);
signaller.start(); signaller.start();
} }
@ -3501,6 +3502,7 @@ impl ElementImpl for WebRTCSink {
drop(settings); drop(settings);
let mut state = self.state.lock().unwrap(); let mut state = self.state.lock().unwrap();
if state.should_start_signaller(&element) { if state.should_start_signaller(&element) {
state.signaller_state = SignallerState::Started;
drop(state); drop(state);
signaller.start(); signaller.start();
} }