From 29bae0bc727b990a40c48f59baad284e0cc89189 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Sun, 16 Mar 2014 11:05:56 +0100 Subject: [PATCH] pad: actually return data.ret The return value from gst_pad_forward() is the aggregated return value from the callback and the callback returns FALSE to continue iterating. --- gst/gstutils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gst/gstutils.c b/gst/gstutils.c index 55de1309b1..9f6ffa6eba 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -2449,7 +2449,6 @@ gboolean gst_pad_proxy_query_accept_caps (GstPad * pad, GstQuery * query) { QueryAcceptCapsData data; - gboolean result; g_return_val_if_fail (GST_IS_PAD (pad), FALSE); g_return_val_if_fail (GST_IS_QUERY (query), FALSE); @@ -2460,16 +2459,16 @@ gst_pad_proxy_query_accept_caps (GstPad * pad, GstQuery * query) data.query = query; /* value to hold the return, by default it holds TRUE */ + /* FIXME: TRUE is wrong when there are no pads */ data.ret = TRUE; - result = gst_pad_forward (pad, (GstPadForwardFunction) query_accept_caps_func, - &data); + gst_pad_forward (pad, (GstPadForwardFunction) query_accept_caps_func, &data); gst_query_set_accept_caps_result (query, data.ret); GST_CAT_DEBUG_OBJECT (GST_CAT_PADS, pad, "proxying accept caps query: %d", - result); + data.ret); - return result; + return data.ret; } typedef struct @@ -2543,6 +2542,7 @@ gst_pad_proxy_query_caps (GstPad * pad, GstQuery * query) gst_query_set_caps_result (query, result); gst_caps_unref (result); + /* FIXME: return something depending on the processing */ return TRUE; }