sannies / mp4parser

A Java API to read, write and create MP4 files
Apache License 2.0
2.74k stars 563 forks source link

Fix for failing tests due to IndexOutOfRangeException in DefaultMp4SampleList, Fix for FragmentedMp4Writer producing invalid MP4 file #466

Open jimm98y opened 1 year ago

jimm98y commented 1 year ago

Currently many tests are failing because of an IndexOutOfRangeException in DefaultMp4SampleList on line 74. "entries" are empty because parseDetails has not been called to populate them.

Additionally, FragmentedMp4Writer was producing an invalid mp4 files with all samples in the "trun" box having zero size. This is also fixed and I've added a test for the FragmentedMp4Writer that now produces playable mp4 file.

Also fixes #334.

Finally, H265 muxing now produces a valid mp4 file that can be played in both Media player on Windows and VLC/ffmpeg.