mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-25 12:42:04 +08:00
If cache was enabled, using ordered chapters could easily crash. The reason is that enable_cache() reopens the demuxer and closes the old one. The code after that (reading m->ordered_chapters etc.) then accessed freed data. This commit also avoids enabling cache for files which are not used (which would make opening much slower).