mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-08 02:05:26 +00:00
togglerecord: Notify main_stream_cond on release_pad
Otherwise, it would deadlock when releasing first the primary stream and then the secondary one, because it will wait in the "secondary stream" handling for the main stream to be fed, which will never happen.
This commit is contained in:
parent
b62b5f9643
commit
add7fd2693
1 changed files with 7 additions and 3 deletions
|
@ -2041,9 +2041,6 @@ impl ElementImpl for ToggleRecord {
|
|||
Some(stream) => stream.clone(),
|
||||
};
|
||||
|
||||
stream.srcpad.set_active(false).unwrap();
|
||||
stream.sinkpad.set_active(false).unwrap();
|
||||
|
||||
pads.remove(&stream.sinkpad).unwrap();
|
||||
pads.remove(&stream.srcpad).unwrap();
|
||||
|
||||
|
@ -2054,6 +2051,13 @@ impl ElementImpl for ToggleRecord {
|
|||
drop(pads);
|
||||
drop(other_streams_guard);
|
||||
|
||||
let main_state = self.main_stream.state.lock();
|
||||
self.main_stream_cond.notify_all();
|
||||
drop(main_state);
|
||||
|
||||
stream.srcpad.set_active(false).unwrap();
|
||||
stream.sinkpad.set_active(false).unwrap();
|
||||
|
||||
element.remove_pad(&stream.sinkpad).unwrap();
|
||||
element.remove_pad(&stream.srcpad).unwrap();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue