tests: aacparse: use caps query instead of accept-caps
authorThiago Santos <thiagoss@osg.samsung.com>
Fri, 14 Aug 2015 14:41:42 +0000 (11:41 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Fri, 14 Aug 2015 16:42:27 +0000 (13:42 -0300)
The accept-caps query just does a shallow check at the current
element while at this test we want it to also look at downstream.
So use caps query there.

https://bugzilla.gnome.org/show_bug.cgi?id=753623

tests/check/elements/aacparse.c

index 6ec29d6..9022886 100644 (file)
@@ -189,7 +189,7 @@ GST_END_TEST;
 
 GST_START_TEST (test_parse_proxy_constraints)
 {
-  GstCaps *caps;
+  GstCaps *caps, *resultcaps;
   GstElement *parse, *filter;
   GstPad *sinkpad;
   GstStructure *s;
@@ -218,12 +218,16 @@ GST_START_TEST (test_parse_proxy_constraints)
 
   /* should accept without the constraint */
   caps = gst_caps_from_string ("audio/mpeg,mpegversion=2");
-  fail_unless (gst_pad_query_accept_caps (sinkpad, caps));
+  resultcaps = gst_pad_query_caps (sinkpad, caps);
+  fail_if (gst_caps_is_empty (resultcaps));
+  gst_caps_unref (resultcaps);
   gst_caps_unref (caps);
 
   /* should not accept with conflicting version */
   caps = gst_caps_from_string ("audio/mpeg,mpegversion=4");
-  fail_if (gst_pad_query_accept_caps (sinkpad, caps));
+  resultcaps = gst_pad_query_caps (sinkpad, caps);
+  fail_unless (gst_caps_is_empty (resultcaps));
+  gst_caps_unref (resultcaps);
   gst_caps_unref (caps);
 
   gst_object_unref (sinkpad);