demux: mp4: optimize mp4_chunk memory allocation
1. Avoid dynamic memory allocation for small samples_per_chunk (less or equal to 2 sample per chunk). Depends on the test file and OS, the time taking by MP4_TrackClean can be reduced from a few seconds to dozens of milliseconds. 2. Merge some allocation to single memory chunk. For mp4 files with a lot of chunks, the time taking by MP4_TrackClean can be reduced by half.
parent
0ecf4e81
No related branches found
No related tags found
Loading
Please register or sign in to comment