From a6dcbf9446faac67e493af23de73fe6448b84a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alicia=20Boya=20Garc=C3=ADa?= Date: Mon, 27 Jan 2025 14:44:02 +0100 Subject: [PATCH] tracers: log: Fix wrong argument in do_chain_buffer_pre() The third argument of the pad-chain-pre and pad-chain-post hooks are of type GstBuffer* and GstBufferList* respectively. However, when I added do_chain_buffer_pre() and do_chain_buffer_post() to gstlog.c I accidentally make them take GstFlowReturn -- almost certainly as an artifact from duplicating the code of the _post() variants, leading to erroneous log lines like this: ``` do_chain_buffer_pre: 0:00:01.615378540, pad=, res=-1073639680 ``` This patch fixes that. Part-of: --- subprojects/gstreamer/plugins/tracers/gstlog.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/subprojects/gstreamer/plugins/tracers/gstlog.c b/subprojects/gstreamer/plugins/tracers/gstlog.c index 6749fcd27a..985598ef41 100644 --- a/subprojects/gstreamer/plugins/tracers/gstlog.c +++ b/subprojects/gstreamer/plugins/tracers/gstlog.c @@ -193,11 +193,11 @@ do_push_buffer_list_post (GstTracer * self, guint64 ts, GstPad * pad, static void do_chain_buffer_pre (GstTracer * self, guint64 ts, GstPad * pad, - GstFlowReturn res) + GstBuffer * buffer) { do_log (GST_CAT_BUFFER, GST_FUNCTION, (GObject *) pad, - "%" GST_TIME_FORMAT ", pad=%" GST_PTR_FORMAT ", res=%d", - GST_TIME_ARGS (ts), pad, res); + "%" GST_TIME_FORMAT ", pad=%" GST_PTR_FORMAT ", buffer=%" GST_PTR_FORMAT, + GST_TIME_ARGS (ts), pad, buffer); } static void @@ -211,11 +211,11 @@ do_chain_buffer_post (GstTracer * self, guint64 ts, GstPad * pad, static void do_chain_buffer_list_pre (GstTracer * self, guint64 ts, GstPad * pad, - GstFlowReturn res) + GstBufferList * list) { do_log (GST_CAT_BUFFER_LIST, GST_FUNCTION, (GObject *) pad, - "%" GST_TIME_FORMAT ", pad=%" GST_PTR_FORMAT ", res=%d", - GST_TIME_ARGS (ts), pad, res); + "%" GST_TIME_FORMAT ", pad=%" GST_PTR_FORMAT ", list=%p", + GST_TIME_ARGS (ts), pad, list); } static void