Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@onestream.live>2022-03-28 13:47:53 +0300
committerGuillaume Desmottes <guillaume.desmottes@onestream.live>2022-03-28 14:48:25 +0300
commit354c2862e052707448d058994f7c183d2ee8ab35 (patch)
tree031de81853ca56761ca9a802abfa3b21f592f9f8 /utils/uriplaylistbin/src
parent6744497cf60075829a63489fc63e75757adfd368 (diff)
uriplaylistbin: handle waiting items no longer being set
ab96219c19f9009de1d942c41adebd0dd1645750 broke some assertions as waiting items are now unset when shutting down the element.
Diffstat (limited to 'utils/uriplaylistbin/src')
-rw-r--r--utils/uriplaylistbin/src/uriplaylistbin/imp.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs
index 1124f3b4..a41d768a 100644
--- a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs
+++ b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs
@@ -1233,7 +1233,10 @@ impl UriPlaylistBin {
return;
}
- let item = state.waiting_for_pads.clone().unwrap();
+ let item = match state.waiting_for_pads.as_ref() {
+ Some(item) => item.clone(),
+ None => return, // element is being shutdown
+ };
// Parse the pad name to extract the stream type and its index.
// We could get the type from the Stream object from the StreamStart sticky event but we'd still have
@@ -1530,7 +1533,11 @@ impl UriPlaylistBin {
let mut state_guard = self.state.lock().unwrap();
let state = state_guard.as_mut().unwrap();
- let item = state.waiting_for_ss_eos.take().unwrap();
+ let item = match state.waiting_for_ss_eos.take() {
+ Some(item) => item,
+ None => return, // element is being shutdown
+ };
+
let (topology, pending_pads, sender) = item.done_waiting_for_ss_eos();
state.waiting_for_pads = Some(item);