GstStructure *s;
guint ssrc;
guint8 ext_id;
+ GstCaps *rtpcaps = gst_caps_new_empty_simple (RTP_CAPS);
gst_event_parse_caps (event, &caps);
GST_OBJECT_LOCK (funnel);
- if (!gst_caps_can_intersect (funnel->srccaps, caps)) {
+ if (!gst_caps_can_intersect (rtpcaps, caps)) {
GST_ERROR_OBJECT (funnel, "Can't intersect with caps %" GST_PTR_FORMAT,
caps);
g_assert_not_reached ();
}
+ gst_caps_unref (rtpcaps);
+
s = gst_caps_get_structure (caps, 0);
if (gst_structure_get_uint (s, "ssrc", &ssrc)) {
fpad->ssrc = ssrc;
{
GstCaps *filter_caps;
GstCaps *new_caps;
+ GstCaps *rtpcaps = gst_caps_new_empty_simple (RTP_CAPS);
gst_query_parse_caps (query, &filter_caps);
GST_OBJECT_LOCK (funnel);
if (filter_caps) {
- new_caps = gst_caps_intersect_full (funnel->srccaps, filter_caps,
+ new_caps = gst_caps_intersect_full (rtpcaps, filter_caps,
GST_CAPS_INTERSECT_FIRST);
+ gst_caps_unref (rtpcaps);
} else {
- new_caps = gst_caps_copy (funnel->srccaps);
+ new_caps = rtpcaps;
}
GST_OBJECT_UNLOCK (funnel);
gst_harness_set_src_caps_str (h0, "application/x-rtp, "
"ssrc=(uint)123, extmap-5=" TWCC_EXTMAP_STR "");
- /* request a second sinkpad, and verify the extmap is
- present in the caps when doing a caps-query downstream */
+ /* request a second sinkpad, the extmap should not be
+ present in the caps when doing a caps-query downstream,
+ as we don't want to force upstream (typically a payloader)
+ to use the extension */
h1 = gst_harness_new_with_element (h->element, "sink_1", NULL);
caps = gst_pad_query_caps (GST_PAD_PEER (h1->srcpad), NULL);
- expected_caps = gst_caps_from_string ("application/x-rtp, "
- "extmap-5=" TWCC_EXTMAP_STR "");
+ expected_caps = gst_caps_new_empty_simple ("application/x-rtp");
fail_unless (gst_caps_is_equal (expected_caps, caps));
gst_caps_unref (caps);
gst_caps_unref (expected_caps);