rtp: av1pay: Derive Default trait for the state instead of manual implementation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1624>
This commit is contained in:
Sebastian Dröge 2024-06-17 13:55:52 +03:00
parent d357a63bf9
commit 4677948a82

View file

@ -63,7 +63,7 @@ struct ObuData {
id: u64,
}
#[derive(Clone, Debug, PartialEq, Eq)]
#[derive(Clone, Debug, Default, PartialEq, Eq)]
struct State {
/// Holds header information and raw bytes for all received OBUs,
/// as well as DTS and PTS
@ -82,16 +82,6 @@ pub struct RTPAv1Pay {
state: AtomicRefCell<State>,
}
impl Default for State {
fn default() -> Self {
Self {
obus: VecDeque::new(),
open_obu_fragment: false,
framed: false,
}
}
}
impl RTPAv1Pay {
fn reset(&self, state: &mut State, full: bool) {
gst::debug!(CAT, imp: self, "resetting state");