mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-29 15:01:07 +00:00
rtpav1depay: Don't unnecessary map RTP payload a second time
`RTPBuffer` already has it mapped internally and can give direct access to it as byte slice.
This commit is contained in:
parent
7edc9e656f
commit
cc0ef5290f
1 changed files with 2 additions and 9 deletions
|
@ -164,14 +164,7 @@ impl RTPBaseDepayloadImpl for RTPAv1Depay {
|
|||
rtp.buffer().size(),
|
||||
);
|
||||
|
||||
let payload = rtp
|
||||
.payload_buffer()
|
||||
.map_err(err_opt!(element, payload_buf))
|
||||
.ok()?;
|
||||
let payload_map = payload
|
||||
.map_readable()
|
||||
.map_err(err_opt!(element, payload_map))
|
||||
.ok()?;
|
||||
let payload = rtp.payload().map_err(err_opt!(element, payload_buf)).ok()?;
|
||||
|
||||
let mut state = self.state.lock().unwrap();
|
||||
|
||||
|
@ -182,7 +175,7 @@ impl RTPBaseDepayloadImpl for RTPAv1Depay {
|
|||
|
||||
// number of bytes that can be used in the next outgoing buffer
|
||||
let mut bytes_ready = 0;
|
||||
let mut reader = Cursor::new(payload_map.as_ref());
|
||||
let mut reader = Cursor::new(payload);
|
||||
let mut ready_obus = Buffer::new();
|
||||
|
||||
let aggr_header = {
|
||||
|
|
Loading…
Reference in a new issue