mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-27 01:56:19 +00:00
Fix a couple of trivial clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1226>
This commit is contained in:
parent
31b06e52ea
commit
dfb261ac9a
2 changed files with 4 additions and 5 deletions
|
@ -782,8 +782,8 @@ impl State {
|
||||||
self.offset
|
self.offset
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut outbuf = gst::Buffer::with_size(src.len() * mem::size_of::<f64>())
|
let mut outbuf =
|
||||||
.map_err(|_| gst::FlowError::Error)?;
|
gst::Buffer::with_size(mem::size_of_val(src)).map_err(|_| gst::FlowError::Error)?;
|
||||||
{
|
{
|
||||||
let outbuf = outbuf.get_mut().unwrap();
|
let outbuf = outbuf.get_mut().unwrap();
|
||||||
let mut dst = outbuf.map_writable().map_err(|_| gst::FlowError::Error)?;
|
let mut dst = outbuf.map_writable().map_err(|_| gst::FlowError::Error)?;
|
||||||
|
|
|
@ -106,7 +106,6 @@ fn main() {
|
||||||
|
|
||||||
let bus = pipeline.bus().unwrap();
|
let bus = pipeline.bus().unwrap();
|
||||||
let terminated_count = Arc::new(AtomicU32::new(0));
|
let terminated_count = Arc::new(AtomicU32::new(0));
|
||||||
let pipeline_clone = pipeline.clone();
|
|
||||||
let l_clone = l.clone();
|
let l_clone = l.clone();
|
||||||
let _bus_watch = bus
|
let _bus_watch = bus
|
||||||
.add_watch(move |_, msg| {
|
.add_watch(move |_, msg| {
|
||||||
|
@ -163,11 +162,11 @@ fn main() {
|
||||||
|
|
||||||
gst::info!(CAT, "Switching to Ready");
|
gst::info!(CAT, "Switching to Ready");
|
||||||
let stop = Instant::now();
|
let stop = Instant::now();
|
||||||
pipeline_clone.set_state(gst::State::Ready).unwrap();
|
pipeline.set_state(gst::State::Ready).unwrap();
|
||||||
gst::info!(CAT, "Switching to Ready took {:.2?}", stop.elapsed());
|
gst::info!(CAT, "Switching to Ready took {:.2?}", stop.elapsed());
|
||||||
|
|
||||||
gst::info!(CAT, "Shutting down");
|
gst::info!(CAT, "Shutting down");
|
||||||
let stop = Instant::now();
|
let stop = Instant::now();
|
||||||
pipeline_clone.set_state(gst::State::Null).unwrap();
|
pipeline.set_state(gst::State::Null).unwrap();
|
||||||
gst::info!(CAT, "Shutting down took {:.2?}", stop.elapsed());
|
gst::info!(CAT, "Shutting down took {:.2?}", stop.elapsed());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue