mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-28 22:41:02 +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
|
||||
);
|
||||
|
||||
let mut outbuf = gst::Buffer::with_size(src.len() * mem::size_of::<f64>())
|
||||
.map_err(|_| gst::FlowError::Error)?;
|
||||
let mut outbuf =
|
||||
gst::Buffer::with_size(mem::size_of_val(src)).map_err(|_| gst::FlowError::Error)?;
|
||||
{
|
||||
let outbuf = outbuf.get_mut().unwrap();
|
||||
let mut dst = outbuf.map_writable().map_err(|_| gst::FlowError::Error)?;
|
||||
|
|
|
@ -106,7 +106,6 @@ fn main() {
|
|||
|
||||
let bus = pipeline.bus().unwrap();
|
||||
let terminated_count = Arc::new(AtomicU32::new(0));
|
||||
let pipeline_clone = pipeline.clone();
|
||||
let l_clone = l.clone();
|
||||
let _bus_watch = bus
|
||||
.add_watch(move |_, msg| {
|
||||
|
@ -163,11 +162,11 @@ fn main() {
|
|||
|
||||
gst::info!(CAT, "Switching to Ready");
|
||||
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, "Shutting down");
|
||||
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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue