Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUpdate to gstreamer-rs 0.14 #272
Conversation
| @@ -220,7 +218,7 @@ impl AudioDecoder for GStreamerAudioDecoder { | |||
| })?; | |||
|
|
|||
| for position in positions.iter() { | |||
| let buffer = buffer.clone(); | |||
| let buffer = buffer.to_owned(); | |||
This comment has been minimized.
This comment has been minimized.
sdroege
Jun 26, 2019
Contributor
Why is this necessary, a whole buffer copy instead of just getting a new reference?
This comment has been minimized.
This comment has been minimized.
sdroege
Jun 26, 2019
Contributor
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.
| @@ -96,9 +96,9 @@ impl GStreamerRender { | |||
| } | |||
|
|
|||
| 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(); | |||
This comment has been minimized.
This comment has been minimized.
|
Generally it looks like the update improved the code a bit and made it nicer to read. Or what do you think? :) |
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 |
|
|
Update to gstreamer-rs 0.14
|
|
ceyusa commentedJun 26, 2019
No description provided.