Skip to content

Commit

Permalink
mp4: Don't range sort samples, keep sample table order
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed Jul 22, 2022
1 parent 6011d0b commit c6d0d89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions format/mp4/mp4.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ func mp4Tracks(d *decode.D, ctx *decodeContext) {
d.FieldArray("samples", func(d *decode.D) {
// TODO: warning? could also be init fragment etc

// make sure to keep samples in same order as in sample table.
// there are mp4 files where stco jumps around
d.RangeSorted = false

if len(t.stsz) > 0 && len(t.stsc) > 0 && len(t.stco) > 0 {
stszIndex := 0
stszEntryNr := 0
Expand Down

0 comments on commit c6d0d89

Please sign in to comment.