mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-03 15:58:42 +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/1624>
This commit is contained in:
parent
d357a63bf9
commit
4677948a82
1 changed files with 1 additions and 11 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue