Conversation
backends/gstreamer/audio_decoder.rs
Outdated
|
|
||
| for position in positions.iter() { | ||
| let buffer = buffer.clone(); | ||
| let buffer = buffer.to_owned(); |
There was a problem hiding this comment.
Why is this necessary, a whole buffer copy instead of just getting a new reference?
There was a problem hiding this comment.
There's Sample::get_buffer_owned() if that's the issue here, which allows to do this without a copy of the buffer. See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/204 for the background.
backends/gstreamer/render.rs
Outdated
|
|
||
| pub fn get_frame_from_sample(&self, sample: &gst::Sample) -> Result<Frame, ()> { | ||
| let buffer = sample.get_buffer().ok_or_else(|| ())?; | ||
| let buffer = sample.get_buffer().ok_or_else(|| ())?.to_owned(); |
|
Generally it looks like the update improved the code a bit and made it nicer to read. Or what do you think? :) |
ce639f8 to
bddabeb
Compare
Agree, it feels more rusty, in the sense of the language, of course :) Thanks @sdroege, specially for the |
|
@bors-servo r+ Should also fix the unsafe code used in webrtcbin for https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/189 |
|
📌 Commit bddabeb has been approved by |
Update to gstreamer-rs 0.14
|
☀️ Test successful - checks-travis |
No description provided.