Skip to content
  • Zhao Zhili's avatar
    demux: mp4: optimize mp4_chunk memory allocation · 979bca40
    Zhao Zhili authored
    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.
    979bca40