pad: forward return value from gst_pad_forward
authorStefan Sauer <ensonic@users.sf.net>
Sat, 15 Mar 2014 14:54:33 +0000 (15:54 +0100)
committerStefan Sauer <ensonic@users.sf.net>
Sat, 15 Mar 2014 17:07:44 +0000 (18:07 +0100)
Instead of ignoring the return value and always return TRUE pass the already agregated result back.

gst/gstutils.c

index 456d9c6..55de130 100644 (file)
@@ -2449,6 +2449,7 @@ 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);
@@ -2461,10 +2462,14 @@ gst_pad_proxy_query_accept_caps (GstPad * pad, GstQuery * query)
   /* value to hold the return, by default it holds TRUE */
   data.ret = TRUE;
 
-  gst_pad_forward (pad, (GstPadForwardFunction) query_accept_caps_func, &data);
+  result = gst_pad_forward (pad, (GstPadForwardFunction) query_accept_caps_func,
+      &data);
   gst_query_set_accept_caps_result (query, data.ret);
 
-  return TRUE;
+  GST_CAT_DEBUG_OBJECT (GST_CAT_PADS, pad, "proxying accept caps query: %d",
+      result);
+
+  return result;
 }
 
 typedef struct