@@ -437,22 +437,6 @@ impl <T> std::ops::Add for TrackScaledTime<T> where T: Num {
437
437
}
438
438
}
439
439
440
- /// A fragmented file contains no sample data in stts, stsc, and stco.
441
- #[ derive( Debug , Default ) ]
442
- pub struct EmptySampleTableBoxes {
443
- // TODO: Track has stts, stsc and stco, this structure can be discarded.
444
- pub empty_stts : bool ,
445
- pub empty_stsc : bool ,
446
- pub empty_stco : bool ,
447
- }
448
-
449
- /// Check boxes contain data.
450
- impl EmptySampleTableBoxes {
451
- pub fn all_empty ( & self ) -> bool {
452
- self . empty_stts & self . empty_stsc & self . empty_stco
453
- }
454
- }
455
-
456
440
#[ derive( Debug , Default ) ]
457
441
pub struct Track {
458
442
pub id : usize ,
@@ -463,7 +447,6 @@ pub struct Track {
463
447
pub duration : Option < TrackScaledTime < u64 > > ,
464
448
pub track_id : Option < u32 > ,
465
449
pub codec_type : CodecType ,
466
- pub empty_sample_boxes : EmptySampleTableBoxes ,
467
450
pub data : Option < SampleEntry > ,
468
451
pub tkhd : Option < TrackHeaderBox > , // TODO(kinetik): find a nicer way to export this.
469
452
pub stts : Option < TimeToSampleBox > ,
@@ -892,13 +875,11 @@ fn read_stbl<T: Read>(f: &mut BMFFBox<T>, track: &mut Track) -> Result<()> {
892
875
BoxType :: TimeToSampleBox => {
893
876
let stts = read_stts ( & mut b) ?;
894
877
log ! ( "{:?}" , stts) ;
895
- track. empty_sample_boxes . empty_stts = stts. samples . is_empty ( ) ;
896
878
track. stts = Some ( stts) ;
897
879
}
898
880
BoxType :: SampleToChunkBox => {
899
881
let stsc = read_stsc ( & mut b) ?;
900
882
log ! ( "{:?}" , stsc) ;
901
- track. empty_sample_boxes . empty_stsc = stsc. samples . is_empty ( ) ;
902
883
track. stsc = Some ( stsc) ;
903
884
}
904
885
BoxType :: SampleSizeBox => {
@@ -908,7 +889,6 @@ fn read_stbl<T: Read>(f: &mut BMFFBox<T>, track: &mut Track) -> Result<()> {
908
889
}
909
890
BoxType :: ChunkOffsetBox => {
910
891
let stco = read_stco ( & mut b) ?;
911
- track. empty_sample_boxes . empty_stco = stco. offsets . is_empty ( ) ;
912
892
log ! ( "{:?}" , stco) ;
913
893
track. stco = Some ( stco) ;
914
894
}
0 commit comments