Optimize DTS calculation to fix linear access slowdown
Problem:
When reading a file with B-frames, the decoding order is non-sequential. This caused isom_get_dts_from_info_list to repeatedly scan the entire sample list from the beginning, leading to a performance slowdown that worsened as the video progressed.
Solution: Cache the last accessed sample number and its DTS. When the next requested sample is forward in the timeline, start the DTS calculation from the cached position instead of from the start. This changes the operation from O(N) to O(N-M) for forward seeks.
The concept itself seems OK, it just needs to be fixed to use the correct L-SMASH coding style (e.g. for spacing), and then I'll run it through tests.
Pushed with corrected syntax.