diff options
author | Guillaume Desmottes <guillaume.desmottes@onestream.live> | 2022-04-01 11:01:46 +0300 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@onestream.live> | 2022-04-01 13:07:44 +0300 |
commit | 990e5bbeac10cd15e5befeaf228c84efe76aa31e (patch) | |
tree | 00beef36908f07d9683fa6796c5e77ec9b291a93 | |
parent | 354c2862e052707448d058994f7c183d2ee8ab35 (diff) |
uriplaylistbin: remove pad probe when shutting down
The previous patch was unblocking the receiver in the pad probe but
it could be blocked again as the item streaming status was not changed.
-rw-r--r-- | utils/uriplaylistbin/src/uriplaylistbin/imp.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs index a41d768a0..f98c88870 100644 --- a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs +++ b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs @@ -1431,7 +1431,12 @@ impl UriPlaylistBin { pad.name() ); - let _ = receiver.recv(); + if let Ok(false) = receiver.recv() { + // we are shutting down so remove the probe. + // Don't handle Err(_) here as if the item has multiple pads, the sender may be dropped in unblock_item() + // before all probes received the message, resulting in a receiving error. + return gst::PadProbeReturn::Remove; + } gst_log!( CAT, |