File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -4475,7 +4475,7 @@ fn read_stbl<T: Read>(
4475
4475
track. stss = Some ( stss) ;
4476
4476
}
4477
4477
BoxType :: CompositionOffsetBox => {
4478
- let ctts = read_ctts ( & mut b) ?;
4478
+ let ctts = read_ctts ( & mut b, strictness ) ?;
4479
4479
debug ! ( "{:?}" , ctts) ;
4480
4480
track. ctts = Some ( ctts) ;
4481
4481
}
@@ -4747,7 +4747,10 @@ fn read_stsc<T: Read>(src: &mut BMFFBox<T>) -> Result<SampleToChunkBox> {
4747
4747
4748
4748
/// Parse a Composition Time to Sample Box
4749
4749
/// See ISOBMFF (ISO 14496-12:2020) § 8.6.1.3
4750
- fn read_ctts < T : Read > ( src : & mut BMFFBox < T > ) -> Result < CompositionOffsetBox > {
4750
+ fn read_ctts < T : Read > (
4751
+ src : & mut BMFFBox < T > ,
4752
+ strictness : ParseStrictness ,
4753
+ ) -> Result < CompositionOffsetBox > {
4751
4754
let ( version, _) = read_fullbox_extra ( src) ?;
4752
4755
4753
4756
let counts = be_u32 ( src) ?;
@@ -4780,8 +4783,12 @@ fn read_ctts<T: Read>(src: &mut BMFFBox<T>) -> Result<CompositionOffsetBox> {
4780
4783
} ) ?;
4781
4784
}
4782
4785
4783
- // Padding could be added in some contents.
4784
- skip_box_remain ( src) ?;
4786
+ if strictness == ParseStrictness :: Strict {
4787
+ check_parser_state ! ( src. content) ;
4788
+ } else {
4789
+ // Padding may be present in some content.
4790
+ skip_box_remain ( src) ?;
4791
+ }
4785
4792
4786
4793
Ok ( CompositionOffsetBox { samples : offsets } )
4787
4794
}
You can’t perform that action at this time.
0 commit comments