sannies / mp4parser

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

fix sps writing when numsps != numpps #396

Closed ESPNMichaelKidd closed 2 years ago

ESPNMichaelKidd commented 4 years ago

First off, many thanks for this project. While utilizing this library to write an mp4 file from a somewhat interesting h264 encode, I encountered an issue due to the stream containing multiple sps nals. This causes the number of sps and pps nals to be different and exposes an issue with the code that writes the sps. In the current code, the number of pps nals is used when writing the sps nals. I have corrected this issue in this pull request.

sannies commented 2 years ago

thank you