File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ impl TfhdBox {
2222 pub const FLAG_DEFAULT_SAMPLE_DURATION : u32 = 0x08 ;
2323 pub const FLAG_DEFAULT_SAMPLE_SIZE : u32 = 0x10 ;
2424 pub const FLAG_DEFAULT_SAMPLE_FLAGS : u32 = 0x20 ;
25+ pub const FLAG_DURATION_IS_EMPTY : u32 = 0x10000 ;
26+ pub const FLAG_DEFAULT_BASE_IS_MOOF : u32 = 0x20000 ;
2527
2628 pub fn get_type ( & self ) -> BoxType {
2729 BoxType :: TfhdBox
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ impl TrafBox {
1919 pub fn get_size ( & self ) -> u64 {
2020 let mut size = HEADER_SIZE ;
2121 size += self . tfhd . box_size ( ) ;
22+ if let Some ( ref tfdt) = self . tfdt {
23+ size += tfdt. box_size ( ) ;
24+ }
2225 if let Some ( ref trun) = self . trun {
2326 size += trun. box_size ( ) ;
2427 }
@@ -104,6 +107,12 @@ impl<W: Write> WriteBox<&mut W> for TrafBox {
104107 BoxHeader :: new ( self . box_type ( ) , size) . write ( writer) ?;
105108
106109 self . tfhd . write_box ( writer) ?;
110+ if let Some ( ref tfdt) = self . tfdt {
111+ tfdt. write_box ( writer) ?;
112+ }
113+ if let Some ( ref trun) = self . trun {
114+ trun. write_box ( writer) ?;
115+ }
107116
108117 Ok ( size)
109118 }
You can’t perform that action at this time.
0 commit comments