mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-23 03:50:59 +00:00
threadshare: Fix some clippy warnings
This commit is contained in:
parent
bfedca6cfe
commit
9ddcae4ed2
3 changed files with 7 additions and 13 deletions
|
@ -1281,8 +1281,7 @@ impl JitterBuffer {
|
|||
|
||||
let context = {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
let context = Context::acquire(&settings.context, settings.context_wait).unwrap();
|
||||
context
|
||||
Context::acquire(&settings.context, settings.context_wait).unwrap()
|
||||
};
|
||||
|
||||
self.src_pad
|
||||
|
|
|
@ -360,7 +360,7 @@ impl UdpSinkPadHandler {
|
|||
)]),
|
||||
clients_to_configure: vec![],
|
||||
sender: Arc::new(Mutex::new(None)),
|
||||
settings: settings,
|
||||
settings,
|
||||
})))
|
||||
}
|
||||
|
||||
|
@ -680,10 +680,8 @@ impl PadSinkHandler for UdpSinkPadHandler {
|
|||
async move {
|
||||
if let EventView::FlushStop(_) = event.view() {
|
||||
this.start_task(&element);
|
||||
} else {
|
||||
if let Some(sender) = sender.lock().await.as_mut() {
|
||||
sender.send(TaskItem::Event(event)).await.unwrap();
|
||||
}
|
||||
} else if let Some(sender) = sender.lock().await.as_mut() {
|
||||
sender.send(TaskItem::Event(event)).await.unwrap();
|
||||
}
|
||||
true
|
||||
}
|
||||
|
@ -1097,7 +1095,7 @@ impl ObjectSubclass for UdpSink {
|
|||
Self {
|
||||
sink_pad,
|
||||
sink_pad_handler,
|
||||
settings: settings,
|
||||
settings,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -516,16 +516,13 @@ impl PadSinkHandler for PadSinkHandlerTest {
|
|||
) -> bool {
|
||||
gst_debug!(SINK_CAT, obj: pad.gst_pad(), "Handling non-serialized {:?}", event);
|
||||
|
||||
let ret = match event.view() {
|
||||
match event.view() {
|
||||
EventView::FlushStart(..) => {
|
||||
elem_sink_test.stop(&element);
|
||||
true
|
||||
}
|
||||
_ => false,
|
||||
};
|
||||
|
||||
// Should forward item here
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
fn sink_event_serialized(
|
||||
|
|
Loading…
Reference in a new issue