https://bugs.winehq.org/show_bug.cgi?id=56491
Bug ID: 56491 Summary: Videos in BURIKO visual novel engine Product: Wine Version: 9.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: quartz Assignee: wine-bugs@winehq.org Reporter: blubban@gmail.com Distribution: ---
The BURIKO aka Ethornell visual novel engine (seen in, for example, https://store.steampowered.com/app/1200720/MakingLovers/) demands two changes to Wine before videos will work.
First, FilterGraph2_AddSourceFilter() must return the exact value VFW_E_NOT_FOUND if the input filename is an empty string. (Nonexistent files return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) in both Windows and Wine; BURIKO doesn't care.)
Second, it calls FilterGraph2_Render(), with the source pin offering a normal MPEG video; this chooses CLSID_decodebin_parser. BURIKO doesn't particularly care which filters are plugged, but it does demand that the autoplug process calls ReceiveConnection() at least once with .formattype = FORMAT_MPEGVideo or FORMAT_MPEG2Video; the app will reject that format, but it extracts and memorizes the .hdr.bmiHeader.biWidth/biHeight fields, and ignores the resolution in the subsequent FORMAT_VideoInfo.
BURIKO ignores every other field of the MPEG format type, so it's fine to pass (for example) majortype=GUID_NULL subtype=GUID_NULL formattype=FORMAT_MPEGVideo, or a normal RGB24 AM_MEDIA_TYPE except with formattype replaced (could even leave the cbSize a few bytes smaller than a MPEG1VIDEOINFO).
(Third, it looks like there's a memory leak at https://gitlab.winehq.org/wine/wine/-/blob/wine-9.5/dlls/quartz/filtergraph...., I think that path should call IBaseFilter_Release. This won't fix any existing programs, I just saw it while I was already in the area.)
I could submit an MR for those, but I can't think of a clean way to implement the second one, so I'd rather have some discussion on how to best solve this before I implement something that could be wrong.