pad: Fix previous commit
authorEdward Hervey <edward@centricular.com>
Sat, 8 Aug 2015 13:28:19 +0000 (15:28 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Sat, 8 Aug 2015 13:29:30 +0000 (15:29 +0200)
We want to get the caps query *result*

gst/gstpad.c

index 24027781111b4adc404e49f7305bf7d0f82da3fe..89eec99f4ea42f37aef8b47b39a9294e5dfb79bd 100644 (file)
@@ -2662,9 +2662,12 @@ gst_pad_get_allowed_caps (GstPad * pad)
   /* Query peer caps */
   query = gst_query_new_caps (mycaps);
   gst_pad_peer_query (pad, query);
-  gst_query_parse_caps (query, &caps);
+  gst_query_parse_caps_result (query, &caps);
+  gst_caps_ref (caps);
   gst_query_unref (query);
 
+  gst_caps_unref (mycaps);
+
   GST_CAT_DEBUG_OBJECT (GST_CAT_CAPS, pad, "allowed caps %" GST_PTR_FORMAT,
       caps);