gst/gstpad.c: Do query on realized pad, similar to how convert/send_event handle this. Also makes sense, since this p...

Original commit message from CVS:
* gst/gstpad.c: (gst_pad_query):
Do query on realized pad, similar to how convert/send_event handle
this. Also makes sense, since this pad belongs to the function to
which this query will be sent. Fixes #158163.
diff --git a/ChangeLog b/ChangeLog
index 93cb93b..5d019a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-12-17  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
+
+	* gst/gstpad.c: (gst_pad_query):
+	  Do query on realized pad, similar to how convert/send_event handle
+	  this. Also makes sense, since this pad belongs to the function to
+	  which this query will be sent. Fixes #158163.
+
 2004-12-16  Christian Fredrik Kalager Schaller  <uraeus@gnome.org>
 
 	* docs/manual/appendix-programs.xml: fix pipeline to actually work
diff --git a/gst/gstpad.c b/gst/gstpad.c
index 771dd18..583a5ac 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -4318,7 +4318,7 @@
   g_return_val_if_fail (rpad, FALSE);
 
   if (GST_RPAD_QUERYFUNC (rpad))
-    return GST_RPAD_QUERYFUNC (rpad) (GST_PAD (pad), type, format, value);
+    return GST_RPAD_QUERYFUNC (rpad) (GST_PAD (rpad), type, format, value);
 
   return FALSE;
 }