4.6.2 - Remote-ISO track switches no longer re-open the source
Remote-ISO track switches stop re-opening the source (#76)
Selecting a subtitle track, switching audio, or seeking on a network Blu-ray / DVD ISO re-opened a demuxer, and every open re-ran disc recognition: the UDF / ISO9660 directory parse plus a read of every .mpls (Blu-ray) or .IFO (DVD) over HTTP. On a disc with dozens of playlists that round-tripped many times per switch, which the reporter saw as the "disc tray" reopening on each subtitle change. The same reload hit audio-track switches.
Two changes remove it:
-
Disc recognition is memoized per source.
DiscReader.wrapnow caches the parsed disc structure (title list + clip extents) keyed by source URL and selected title. A reopen rebuilds only the cheap concat reader and skips the directory re-parse. The main pump, the subtitle side demuxer, and the audio reload share one cache, so recognition runs once per session. The cache is cleared on a new load so a custom source's placeholder URL cannot bleed one disc into the next. -
The subtitle side demuxer is reused across switches and seeks. For URL sources the open container is retained per source + title and re-seeked to the new playhead and re-pointed at the new stream index, with no re-open or re-probe. A successor reader hands off from its predecessor (cancel + await its exit) before touching the shared demuxer, so the two never read it concurrently. Custom sources (SMB) still open per switch but benefit from the recognition cache.
Net effect on a remote disc: subtitle and audio track switches and seeks no longer re-recognize the disc or re-probe the container, so the "tray reopening" and its delay are gone.
Fixed
- Subtitle track switching on a network Blu-ray / DVD ISO no longer reloads the remote source (#76).
- Audio track switching on a network ISO no longer re-runs disc recognition (#76).
Full diff: 4.6.1...4.6.2