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.
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.