diff options
author | Seungha Yang <seungha@centricular.com> | 2020-10-21 14:39:34 +0300 |
---|---|---|
committer | Seungha Yang <seungha@centricular.com> | 2020-10-21 20:23:22 +0300 |
commit | 46af97219c2e708a0bf79d35a99374ff3431c3bf (patch) | |
tree | a150c87106941824c417d3e18de69cc204e81edb /utils | |
parent | 4eacce80a58206a61da7b15985e9250fdd34aa23 (diff) |
fallbacksrc: Clear exisiting pad probe on restarting
Fallback might happen even after uridecodebin3 exposed pad.
For later use of audio and video streams, clear it if any
Diffstat (limited to 'utils')
-rw-r--r-- | utils/fallbackswitch/src/fallbacksrc.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/fallbackswitch/src/fallbacksrc.rs b/utils/fallbackswitch/src/fallbacksrc.rs index 8c03622c3..fcf00bf95 100644 --- a/utils/fallbackswitch/src/fallbacksrc.rs +++ b/utils/fallbackswitch/src/fallbacksrc.rs @@ -2017,6 +2017,15 @@ impl FallbackSrc { } Some(state) => state, }; + + for stream in [state.video_stream.as_mut(), state.audio_stream.as_mut()] + .iter_mut() + .filter_map(|s| s.as_mut()) + { + stream.source_srcpad_block = None; + stream.source_srcpad = None; + } + gst_debug!(CAT, obj: element, "Waiting for 1s before retrying"); let clock = gst::SystemClock::obtain(); let wait_time = clock.get_time() + gst::SECOND; |