mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-02 14:12:20 +00:00
jitterbuffer: flush RTPJitterBuffer when going to NULL
and cancel our timer
This commit is contained in:
parent
8a4d517dec
commit
9897336896
2 changed files with 4 additions and 1 deletions
|
@ -1312,6 +1312,10 @@ impl ElementImpl for JitterBuffer {
|
|||
.unwrap()
|
||||
.release_pending_future_id(state.pending_future_id.unwrap());
|
||||
state.pending_future_id = None;
|
||||
|
||||
state.jbuf.borrow().flush();
|
||||
|
||||
let _ = state.cancel.take();
|
||||
let _ = state.io_context.take();
|
||||
}
|
||||
_ => (),
|
||||
|
|
|
@ -322,7 +322,6 @@ impl Drop for RTPJitterBufferItem {
|
|||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
if let Some(ref item) = self.0 {
|
||||
eprintln!("Unreffing buffer!");
|
||||
gst_ffi::gst_mini_object_unref(item.data as *mut _)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue