rtpav1: Remove some unneeded lifetime annotations

This commit is contained in:
Sebastian Dröge 2022-09-12 17:49:51 +03:00
parent 8d73b5008a
commit f9a8e121e1
2 changed files with 7 additions and 15 deletions

View file

@ -21,7 +21,7 @@ use gst_rtp::{
use std::{
cmp::Ordering,
io::{Cursor, Read, Seek, SeekFrom},
sync::{Mutex, MutexGuard},
sync::Mutex,
};
use bitstream_io::{BitReader, BitWriter};
@ -62,14 +62,10 @@ static CAT: Lazy<DebugCategory> = Lazy::new(|| {
static TEMPORAL_DELIMITER: Lazy<Memory> = Lazy::new(|| Memory::from_slice(&[0b0001_0010, 0]));
impl RTPAv1Depay {
fn reset<'s>(
&'s self,
element: &<Self as ObjectSubclass>::Type,
state: &mut MutexGuard<'s, State>,
) {
fn reset(&self, element: &<Self as ObjectSubclass>::Type, state: &mut State) {
gst::debug!(CAT, obj: element, "resetting state");
**state = State::default()
*state = State::default()
}
}

View file

@ -101,11 +101,7 @@ impl Default for State {
}
impl RTPAv1Pay {
fn reset<'s>(
&'s self,
element: &<Self as ObjectSubclass>::Type,
state: &mut MutexGuard<'s, State>,
) {
fn reset(&self, element: &<Self as ObjectSubclass>::Type, state: &mut State) {
gst::debug!(CAT, obj: element, "resetting state");
state.obus.clear();
@ -205,10 +201,10 @@ impl RTPAv1Pay {
///
/// If `true` is passed for `force`, packets of any size will be accepted,
/// which is used in flushing the last OBUs after receiving an EOS for example.
fn consider_new_packet<'s>(
&'s self,
fn consider_new_packet(
&self,
element: &<Self as ObjectSubclass>::Type,
state: &mut MutexGuard<'s, State>,
state: &mut State,
force: bool,
) -> Option<PacketOBUData> {
gst::trace!(