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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1628>
This commit is contained in:
Sebastian Dröge 2024-06-17 13:55:52 +03:00 committed by GStreamer Marge Bot
parent 433acfb2c6
commit 627a756f04

View file

@ -67,7 +67,7 @@ struct ObuData {
pts: Option<gst::ClockTime>,
}
#[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
@ -91,18 +91,6 @@ pub struct RTPAv1Pay {
state: Mutex<State>,
}
impl Default for State {
fn default() -> Self {
Self {
obus: VecDeque::new(),
open_obu_fragment: false,
last_dts: None,
last_pts: None,
framed: false,
}
}
}
impl RTPAv1Pay {
fn reset(&self, state: &mut State, full: bool) {
gst::debug!(CAT, imp: self, "resetting state");