Ensure the DirectShow graph is completely destroyed after CloseMediaPrivate().

Destroy all dynamic menus that can possibly hold a reference on an object of the graph.

This fixes a strange issue with the logo not being redrawn in some cases when MadVR was used.
Ensure the keyframe timings array is read/written only by the main thread.

Revert 02356359a23ded82585560fade11b9089d590734 and remove the other duplicate I initially kept. Even if we get that info from the DirectShow graph, the array is filled and used only by the main thread. It's safer and more consistent to have it cleared by the same thread.
PGS Subtitles: Fix subtitles not being removed from screen after d8deeda49e270d02e9eae795265494184f409b29

Since we drop empty segments we were trying to update the end time of segments that weren't in the queue and we ended up modifying the previous segment that was completely unrelated.

Fixes #3691.
internal filters: enable avisynth support
FGManager: Update VSFilter/XySubFilter blocking routines

No longer disable VSFilter with madVR + XySubFilter, and add XySubFilter's
autoloader to be blocked when ISR is enabled as newer versions depend on
that.
Always prefer internal subtitle renderer

ISR does work fine not only with EVR so it can be safely used on XP also.
Fix ISR loading

- Fix ISR being auto-loaded when it shouldn't be.
- Fix ISR loading when auto-loading is disabled.
Disable some UI elements when ISR is unavailable.
Apply astyle
Prevent ISR from loading if VSFilter is already present.
Rename "Auto-load subtitles" to "Use the built-in subtitle renderer"

"Auto-load subtitles" option has been abused to disable ISR for years.
It makes more sense to change its name. Yet we still load ISR if user try to
load subtitles without any other subtitle renderer present in the graph.
ISR: Fix subtitle timing when external timer and madVR is used.

Partially fixes #4141
Merge pull request #132 from m0vie/avisynth

Use LAV Splitter by default to demux AviSynth script.

This avoids using the old VFW interface that is said to be less stable than directly using AviSynth through ffmpeg. Note that this means AviSynth is still required to demux the scripts.
PGS Subtitles: Fix a crash in some cases.

Mimic the change for DVB subtitles just for consistency.
Fix: DVD subtitles were always re-enabled when clicking on a menu entry related to external subtitles.

This commit fixes #4141.
Rename "Enabled" menu entry to "Enable DVD subtitles" for clarity.

This commit fixes #4141.
Fix: Subtitles could be partially rendered when using no subtitle queue.

The previously allocated subpic was reused without checking if it was big enough.
SubPicAllocator: Add a thread-safe way to free the static subpicture.

This is for later use but the static subpicture was currently freed without any locking when changing the DirectX device and I am not quite sure this was safe at all.
ISR: Text subtitles were incorrectly displayed after switching from PGS/DVB subtitles.
Add an implementation of CStdioFile that supports file bigger than 2GB.