sannies / mp4parser

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

1.x #372

Closed Satsrag closed 5 years ago

Satsrag commented 5 years ago

Fix tkhd duration version and different timescales

   * TrackHeaderBox#setDuration should call #setVersion(1) instead of #setFlags(1).
   Because tkhd will be written 32bit duration while TrackHeaderBox duration > Integer.MAX_VALUE.
   The movie timescale,the lcm of tracks' timescale, is too big.

   * DefaultMp4Builder#getTimescale return Max Value of tracks' timescale.
   The lcm of tracks's timescale is to big.

   * DefaultMp4Builder get  Movie timescale from two different methods.
   Return values from DefaultMp4Builder#getTimescale and Movie#getTimescale are different.