File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,8 @@ impl Stream {
60
60
61
61
let n = self . buffer . read ( buf, None ) . await ?;
62
62
let mut b = & buf[ ..n] ;
63
-
64
63
let pkt = rtp:: packet:: Packet :: unmarshal ( & mut b) ?;
64
+
65
65
Ok ( pkt)
66
66
}
67
67
Original file line number Diff line number Diff line change @@ -956,8 +956,7 @@ impl PeerConnectionInternal {
956
956
rsid_extension_id as u8 ,
957
957
) ?;
958
958
959
- let mut packet_buf = & buf. as_mut_slice ( ) [ ..self . setting_engine . get_receive_mtu ( ) ] ;
960
- let packet = rtp:: packet:: Packet :: unmarshal ( & mut packet_buf) . unwrap ( ) ;
959
+ let packet = rtp:: packet:: Packet :: unmarshal ( & mut buf. as_slice ( ) ) . unwrap ( ) ;
961
960
962
961
// TODO: Can we have attributes on the first packets?
963
962
buffered_packets. push_back ( ( packet, Attributes :: new ( ) ) ) ;
Original file line number Diff line number Diff line change @@ -266,9 +266,8 @@ impl RTCPReader for SrtpWriterFuture {
266
266
a : & Attributes ,
267
267
) -> IResult < ( Vec < Box < dyn rtcp:: packet:: Packet + Send + Sync > > , Attributes ) > {
268
268
let read = self . read ( buf) . await ?;
269
- let mut b = & buf[ ..read] ;
269
+ let pkt = rtcp :: packet :: unmarshal ( & mut & buf[ ..read] ) ? ;
270
270
271
- let pkt = rtcp:: packet:: unmarshal ( & mut b) ?;
272
271
Ok ( ( pkt, a. clone ( ) ) )
273
272
}
274
273
}
You can’t perform that action at this time.
0 commit comments