From 84402f39ef93b3a57c325a9de9a49b4bc2822321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 11 Apr 2022 13:35:26 +0300 Subject: [PATCH] fallbacksrc: Reset state in fallbacksrc custom source also if changing the state to READY before failed Otherwise it will panic on the next try because always pads are already linked to the ghostpads. --- utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs b/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs index 85029e0b..46644c53 100644 --- a/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs +++ b/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs @@ -138,7 +138,7 @@ impl ElementImpl for CustomSource { let res = self.parent_change_state(element, transition)?; match transition { - gst::StateChange::ReadyToNull => { + gst::StateChange::ReadyToNull | gst::StateChange::NullToNull => { self.stop(element); } _ => (),