Fixes: f3de748e53b892533ae4f2a220a1f549bfd6adf3
From: Rémi Bernon rbernon@codeweavers.com
Fixes: f3de748e53b892533ae4f2a220a1f549bfd6adf3 --- dlls/winegstreamer/wg_transform.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/dlls/winegstreamer/wg_transform.c b/dlls/winegstreamer/wg_transform.c index 1e666bd7ff0..9ca3368ecb9 100644 --- a/dlls/winegstreamer/wg_transform.c +++ b/dlls/winegstreamer/wg_transform.c @@ -495,7 +495,15 @@ static GstCaps *transform_get_parsed_caps(GstCaps *caps, const char *media_type) else if (gst_structure_get_int(structure, "wmvversion", &value)) gst_caps_set_simple(parsed_caps, "parsed", G_TYPE_BOOLEAN, true, "wmvversion", G_TYPE_INT, value, NULL); else + { + if (!strcmp(media_type, "video/x-h264")) + { + gst_caps_set_simple(parsed_caps, "stream-format", G_TYPE_STRING, "byte-stream", NULL); + gst_caps_set_simple(parsed_caps, "alignment", G_TYPE_STRING, "au", NULL); + } + gst_caps_set_simple(parsed_caps, "parsed", G_TYPE_BOOLEAN, true, NULL); + }
return parsed_caps; } @@ -506,6 +514,7 @@ static bool transform_create_decoder_elements(struct wg_transform *transform, GstCaps *parsed_caps = NULL, *sink_caps = NULL; GstElement *element; bool ret = false; + char *str;
if (!strcmp(input_mime, "audio/x-raw") || !strcmp(input_mime, "video/x-raw")) return true; @@ -526,6 +535,15 @@ static bool transform_create_decoder_elements(struct wg_transform *transform,
if (element) { + if (!(element = create_element("capsfilter", "good")) || + !append_element(transform->container, element, first, last)) + goto done; + if ((str = gst_caps_to_string(parsed_caps))) + { + gst_util_set_object_arg(G_OBJECT(element), "caps", str); + free(str); + } + /* We try to intercept buffers produced by the parser, so if we push a large buffer into the * parser, it won't push everything into the decoder all in one go. */
The mf:transform tests are failing since https://gitlab.winehq.org/wine/wine/-/commit/f3de748e53b892533ae4f2a220a1f54..., I think this should make them pass again but I don't know if it would work with the original issue.
Note that https://gitlab.winehq.org/wine/wine/-/merge_requests/8527 is also necessary on 32bit, as the tests crash otherwise in `test_h264_encoder` due to memory shortage. This is why we've missed the test breakage, as the crash was hiding the new failures.
This merge request was approved by Brendan McGrath.
On Wed Jul 9 08:07:28 2025 +0000, Rémi Bernon wrote:
The mf:transform tests are failing since https://gitlab.winehq.org/wine/wine/-/commit/f3de748e53b892533ae4f2a220a1f54..., I think this should make them pass again but I don't know if it would work with the original issue.
I have a test app that recreates the original issue, and it still works with this MR, so it should be good.
On Wed Jul 9 08:10:20 2025 +0000, Rémi Bernon wrote:
Note that https://gitlab.winehq.org/wine/wine/-/merge_requests/8527 is also necessary on 32bit, as the tests crash otherwise in `test_h264_encoder` due to memory shortage. This is why we've missed the test breakage, as the crash was hiding the new failures.
Thanks for catching this btw. I ran the tests locally, but on my local it defaults to `nvh264dec`, which didn't fail like `avdec_h264` did. But it's not yet clear to me why that is.