mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-28 22:41:02 +00:00
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:
parent
433acfb2c6
commit
627a756f04
1 changed files with 1 additions and 13 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue