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
This commit is contained in:
Seungha Yang 2020-10-21 20:39:34 +09:00
parent 4eacce80a5
commit 46af97219c

View file

@ -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;