Rémi Bernon (@rbernon) commented about dlls/winegstreamer/unixlib.c:
GstPadLinkReturn ret;
GstPad *sink_pad;
if (!(sink_pad = gst_element_get_static_pad(element, "sink")))
- if ((ret = gst_pad_link(src_pad, sink_pad)) != GST_PAD_LINK_OK) {
gchar *name = gst_element_get_name(element);
GST_ERROR("Failed to find sink pad on %s", name);
g_free(name);
gchar *src_name = gst_pad_get_name(src_pad), *sink_name = gst_pad_get_name(sink_pad);
GST_ERROR("Failed to link src pad %s to sink pad %s, reason: %s",
src_name, sink_name, gst_pad_link_get_name(ret));
g_free(sink_name);
g_free(src_name);
You could maybe start using `GST_PTR_FORMAT` instead, as in https://gitlab.winehq.org/wine/wine/-/merge_requests/3938/diffs?commit_id=50..., it would simplify a lot the error paths, here and below. It works with pads and elements, and pretty much every GstObject.