fmp4: block tracks with invalid timescale (#192)

This commit is contained in:
Alessandro Ros
2025-05-04 10:53:30 +02:00
committed by GitHub
parent 93d53ba1af
commit 5e21043480

View File

@@ -209,6 +209,10 @@ func (i *Init) Unmarshal(r io.ReadSeeker) error {
}
mdhd := box.(*mp4.Mdhd)
if mdhd.Timescale == 0 {
return nil, fmt.Errorf("invalid timescale")
}
curTrack.TimeScale = mdhd.Timescale
state = waitingCodec