Rémi Bernon (@rbernon) commented about dlls/winegstreamer/wg_transform.c:
goto done;
- else if (!element)
- if (element)
- {
/* 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.
*/
if ((element = create_element("winegstreamerstepper", NULL)))
{
if (!append_element(transform->container, element, first, last))
g_object_unref(element);
else
/* element is owned by the container */
transform->stepper = WG_STEPPER(element);
}
```suggestion:-10+0 /* 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. */ if ((element = create_element("winegstreamerstepper", NULL))) { if (!append_element(transform->container, element, first, last)) g_object_unref(element); else /* element is owned by the container */ transform->stepper = WG_STEPPER(element); } ```
Please keep this like the other invocations, and as I've suggested above. Ownership is transferred in the append_element call, whether it succeeds or not. If there's anything to fix, it might be in `append_element` itself, depending on whether ownership is indeed preserved if `gst_bin_add` fails, but it's not clear from the documentation, and there are other cases where that calls succeed but `append_element` might still fail in which case ownership has been transferred already.