mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-09-02 01:43:49 +00:00
base: Fix some new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1730>
This commit is contained in:
parent
9b01dffc63
commit
c3d3ce5f2d
2 changed files with 3 additions and 4 deletions
|
@ -258,8 +258,7 @@ impl io::Read for Adapter {
|
||||||
len = buf.len();
|
len = buf.len();
|
||||||
}
|
}
|
||||||
|
|
||||||
self.copy(0, &mut buf[0..len])
|
self.copy(0, &mut buf[0..len]).map_err(io::Error::other)?;
|
||||||
.map_err(|err| io::Error::new(io::ErrorKind::Other, err))?;
|
|
||||||
|
|
||||||
self.flush(len);
|
self.flush(len);
|
||||||
|
|
||||||
|
|
|
@ -454,14 +454,14 @@ pub trait BaseTransformImplExt: BaseTransformImpl {
|
||||||
(&mut outbuf) as *mut *mut gst::ffi::GstBuffer as *mut gst::ffi::GstBuffer,
|
(&mut outbuf) as *mut *mut gst::ffi::GstBuffer as *mut gst::ffi::GstBuffer,
|
||||||
))
|
))
|
||||||
.map(|_| {
|
.map(|_| {
|
||||||
if outbuf == buf as *mut _ {
|
if ptr::eq(outbuf, buf as *mut _) {
|
||||||
PrepareOutputBufferSuccess::InputBuffer
|
PrepareOutputBufferSuccess::InputBuffer
|
||||||
} else {
|
} else {
|
||||||
PrepareOutputBufferSuccess::Buffer(from_glib_full(outbuf))
|
PrepareOutputBufferSuccess::Buffer(from_glib_full(outbuf))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.inspect_err(|_err| {
|
.inspect_err(|_err| {
|
||||||
if outbuf != buf as *mut _ {
|
if !ptr::eq(outbuf, buf as *mut _) {
|
||||||
drop(Option::<gst::Buffer>::from_glib_full(outbuf));
|
drop(Option::<gst::Buffer>::from_glib_full(outbuf));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue