forked from mirrors/gstreamer-rs
utils: streamproducer: Don't use gst_element_send_event()
in another place
It can cause deadlocks thanks to taking the state lock.
This commit is contained in:
parent
754b6487d4
commit
5ee8ee8545
1 changed files with 3 additions and 1 deletions
|
@ -202,7 +202,9 @@ impl StreamProducer {
|
|||
|
||||
if gst_video::UpstreamForceKeyUnitEvent::parse(event).is_ok() {
|
||||
gst::debug!(CAT, obj: &appsink, "Requesting keyframe");
|
||||
let _ = appsink.send_event(event.clone());
|
||||
// Do not use `gst_element_send_event()` as it takes the state lock which may lead to dead locks.
|
||||
let pad = appsink.static_pad("sink").unwrap();
|
||||
let _ = pad.push_event(event.clone());
|
||||
}
|
||||
|
||||
gst::PadProbeReturn::Ok
|
||||
|
|
Loading…
Reference in a new issue