File tree 2 files changed +11
-0
lines changed 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ impl TfhdBox {
22
22
pub const FLAG_DEFAULT_SAMPLE_DURATION : u32 = 0x08 ;
23
23
pub const FLAG_DEFAULT_SAMPLE_SIZE : u32 = 0x10 ;
24
24
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 ;
25
27
26
28
pub fn get_type ( & self ) -> BoxType {
27
29
BoxType :: TfhdBox
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ impl TrafBox {
19
19
pub fn get_size ( & self ) -> u64 {
20
20
let mut size = HEADER_SIZE ;
21
21
size += self . tfhd . box_size ( ) ;
22
+ if let Some ( ref tfdt) = self . tfdt {
23
+ size += tfdt. box_size ( ) ;
24
+ }
22
25
if let Some ( ref trun) = self . trun {
23
26
size += trun. box_size ( ) ;
24
27
}
@@ -104,6 +107,12 @@ impl<W: Write> WriteBox<&mut W> for TrafBox {
104
107
BoxHeader :: new ( self . box_type ( ) , size) . write ( writer) ?;
105
108
106
109
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
+ }
107
116
108
117
Ok ( size)
109
118
}
You can’t perform that action at this time.
0 commit comments