tests: aacparse: use caps query instead of accept-caps

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
This commit is contained in:
Thiago Santos 2015-08-14 11:41:42 -03:00
parent 9523fb23ed
commit 2b1db23175

View file

@ -189,7 +189,7 @@ GST_END_TEST;
GST_START_TEST (test_parse_proxy_constraints) GST_START_TEST (test_parse_proxy_constraints)
{ {
GstCaps *caps; GstCaps *caps, *resultcaps;
GstElement *parse, *filter; GstElement *parse, *filter;
GstPad *sinkpad; GstPad *sinkpad;
GstStructure *s; GstStructure *s;
@ -218,12 +218,16 @@ GST_START_TEST (test_parse_proxy_constraints)
/* should accept without the constraint */ /* should accept without the constraint */
caps = gst_caps_from_string ("audio/mpeg,mpegversion=2"); 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); gst_caps_unref (caps);
/* should not accept with conflicting version */ /* should not accept with conflicting version */
caps = gst_caps_from_string ("audio/mpeg,mpegversion=4"); 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_caps_unref (caps);
gst_object_unref (sinkpad); gst_object_unref (sinkpad);