1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2024-12-22 20:16:27 +00:00

Skip serializing edts if Option::is_none.

This commit is contained in:
Alf 2020-09-09 21:02:38 -07:00
parent dd2eae6eed
commit a1f7902c6c

View file

@ -7,7 +7,10 @@ use crate::mp4box::{edts::EdtsBox, mdia::MdiaBox, tkhd::TkhdBox};
#[derive(Debug, Clone, PartialEq, Default, Serialize)] #[derive(Debug, Clone, PartialEq, Default, Serialize)]
pub struct TrakBox { pub struct TrakBox {
pub tkhd: TkhdBox, pub tkhd: TkhdBox,
#[serde(skip_serializing_if = "Option::is_none")]
pub edts: Option<EdtsBox>, pub edts: Option<EdtsBox>,
pub mdia: MdiaBox, pub mdia: MdiaBox,
} }