http://bugs.winehq.org/show_bug.cgi?id=60183 Bug ID: 60183 Summary: wg_format_from_caps has no image/* branch — Media Foundation Source Reader fails to decode WebP sprites (MEError 0xc00d3e85) Product: Wine Version: 11.3 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: mfplat Assignee: wine-bugs@list.winehq.org Reporter: mendez.gabriele@gmail.com Target Milestone: --- Distribution: --- Created attachment 81858 --> http://bugs.winehq.org/attachment.cgi?id=81858 MF Source Reader fails to decode WebP sprites (Unhandled caps image/webp → MEError 0xc00d3e85), PNG through same path works. WINEDEBUG=+mfplat,+mfreadwrite,+mf, wine 11. A Windows game (Internet Survivor Survivors, Steam app 4625810, DXライブラリ/DxLib engine) decodes sprite images stored as WebP through the Media Foundation Source Reader. On wine, this fails: every WebP sprite produces MEError 0xc00d3e85 and an empty texture, while PNG and MP4 files going through the exact same MFCreateSourceReaderFromURL path decode correctly. The root cause is a missing branch in wg_format_from_caps: wine's GStreamer backend successfully typefinds image/webp, loads libgstwebp, creates the "webpdec" element and links it — but wine's glue layer (wg_format_from_caps in dlls/winegstreamer/wg_format.c) has no case for image/* caps at all, so it falls through to the GST_FIXME "Unhandled caps" path and the conversion from GStreamer caps to MF media type never happens. Relevant fact: wg_format_from_caps() in wine master (as of 2026-08-16) only handles: audio/x-raw, video/x-raw, audio/mpeg, audio/x-wma, video/x-cinepak, video/x-indeo, video/x-wmv, video/mpeg, video/x-h264. There is no image/* major type. Any image format decoded via GStreamer will hit the same wall — not just WebP. The game works on real Windows because the OS ships the "WebP Image Extensions" Store package, which registers the MF/WIC handler for image/webp. Environment: - wine base: wine 11 (via proton-cachyos-slr, CachyOS Proton build) - GPU: AMD Radeon RX 6400 (RADV, Mesa 26.1.6-arch3.1) - Kernel: 7.1.8-1-cachyos - Compositor: Hyprland (Wayland), game launched through gamescope Steps to reproduce: 1. Launch the game (Internet Survivor Survivors, Steam 4625810) under wine/Proton. 2. Play until any enemy drops coins or until a WebP sprite is loaded. 3. Observe: the sprite is invisible (empty texture). The game continues normally. 4. (Instrumented) Launch with WINEDEBUG=+mfplat,+mfreadwrite,+mf to capture the Source Reader traces. Expected behavior: WebP sprites decode to textures and render visibly, same as PNG. Actual behavior: WebP sprites produce MEError 0xc00d3e85 and render as empty/black. Trace evidence (from WINEDEBUG=+mfplat,+mfreadwrite,+mf, 667k-line log): 1. GStreamer side works — image/webp is typefound, libgstwebp loads, webpdec element is created and linked: 0:00:00.009092474 GST_TYPEFIND gsttypefind.c:72:gst_type_find_register: registering typefind function for image/webp 0:00:00.011216905 GST_EVENT gstevent.c:912:gst_event_new_caps: creating caps event image/webp 0:00:00.012228410 GST_PLUGIN_LOADING gstplugin.c:999:_priv_gst_plugin_load_file_for_registry: plugin "...libgstwebp.so" loaded 0:00:00.012233630 GST_ELEMENT_FACTORY gstelementfactory.c:490:gst_element_factory_create_with_properties: creating element "webpdec" 0:00:00.012308701 GST_PADS gstpad.c:2449:gst_pad_link_prepare: trying to link typefind:src and webpdec0:sink 0:00:00.012313270 GST_PADS gstpad.c:2630:gst_pad_link_full: linked typefind:src and webpdec0:sink, successful 0:00:00.012331264 GST_STATES gstelement.c:2798:gst_element_continue_state: <webpdec0> completed state change to READY 2. Wine's glue then fails — wg_format_from_caps hits the unhandled-caps FIXME: 0:00:00.011275646 FIXME WINE wg_format.c:681:wg_format_from_caps: Unhandled caps image/webp. (Also from winedmo:) 0288:fixme:dmo:demuxer_create Unknown MIME type for format "webp_pipe", url "C:\\users\\steamuser\\AppData\\Local\\Temp\\tmp1c21.tmp" 3. MEError 0xc00d3e85 is queued for every WebP sprite: 01c4:trace:mfplat:eventqueue_QueueEventParamVar 00000000007131C0, MEError, {00000000-0000-0000-0000-000000000000}, 0xc00d3e85, (null) 01c4:trace:mfplat:MFCreateMediaEvent MEError, {00000000-0000-0000-0000-000000000000}, 0xc00d3e85, (null), 0000000004A3DEE8. 4. The full chain for one sprite (goldcoinbig): - Game calls MFCreateSourceReaderFromURL on the original PNG: 0194:trace:mfplat:MFCreateSourceReaderFromURL L"Z:\\...\\Data\\img\\item\\goldcoinbig.png", 0000000000000000, 000000000A8F1220. - Game then extracts a WebP copy to %TEMP% and calls MFCreateSourceReaderFromURL on it: 0194:trace:mfplat:MFCreateSourceReaderFromURL L"C:\\users\\steamuser\\AppData\\Local\\Temp\\tmp32aa.tmp", 0000000000000000, 000000000A8F1220. - GStreamer processes it (typefind → webpdec, see #1 above)... - Wine glue aborts (see #2 above)... - MEError fires (see #3 above). - Result: empty texture, sprite invisible. 5. For comparison, PNG through the same Source Reader produces zero errors: 01c4:trace:mfplat:MFCreateSourceReaderFromURL L"Z:\\...\\Data\\img\\Shot\\berry_circle_b\\magiccircleb0320.png", 0000000000000000, 000000000A7C3480. (No MEError follows — clean decode.) 6. The WebP files are static lossless (VP8L), not animated: - 96 WebP files dumped from %TEMP%, every one is RIFF...WEBP with VP8L chunk. - No ANIM or ANMF chunks present in any file. Suggested fix: Add an image/* branch to wg_format_from_caps() in dlls/winegstreamer/wg_format.c, mapping image/webp (and potentially other image formats) to the appropriate MF media type (MFMediaType_Image with MFImageFormat_WebP, or a raw video format equivalent). The GStreamer decoder pipeline already works end to end — only the caps-to-MF-type conversion is missing. Additionally, the winedmo demuxer_create() in dlls/winedmo/unix_demuxer.c should handle the "webp_pipe" MIME type (currently falls through to "Unsupported MIME type"). See also: - Bug 59848 (feature request: "Please add WebP, AVIF and JXL support") — this report provides a concrete game reproduction and trace evidence for the WebP case. - wine master wg_format.c: https://github.com/wine-mirror/wine/blob/master/dlls/winegstreamer/wg_format... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.