mozilla / mp4parse-rust

Parser for ISO Base Media Format aka video/mp4 written in Rust.
Mozilla Public License 2.0
404 stars 62 forks source link

Limit the allocated size of the sample indice table by the file size. #396

Open Zaggy1024 opened 1 year ago

Zaggy1024 commented 1 year ago

This is a proof of concept for my solution to slow OOMs in create_sample_table() laid out in #395.

Zaggy1024 commented 1 year ago

If this issue is able to occur on the MP4 side, this currently doesn't affect that, since the MP4 code in Gecko seems more complicated to do this with. If I can figure out how to get the size of the downloaded data there, I can probably modify it to request indices as the available data increases.