1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2024-05-19 16:58:04 +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)]
pub struct TrakBox {
pub tkhd: TkhdBox,
#[serde(skip_serializing_if = "Option::is_none")]
pub edts: Option<EdtsBox>,
pub mdia: MdiaBox,
}