rtpmux: Don't set PROXY_CAPS flag on the src pad
authorSjoerd Simons <sjoerd@luon.net>
Fri, 17 Oct 2014 20:23:27 +0000 (22:23 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 21 Oct 2014 08:52:00 +0000 (10:52 +0200)
rtpmux behaves like a funnel in that it forwards whatever upstream is
sending buffers. So setting proxy caps doesn't make sense as the
upstream don't have to have compatible caps, thus resulting in an empty
caps set as a result of a caps query. Instead set fixed caps just
as funnel does.

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

gst/rtpmanager/gstrtpmux.c
tests/check/elements/rtpmux.c

index 77c2a5c..5cddd04 100644 (file)
@@ -245,7 +245,7 @@ gst_rtp_mux_init (GstRTPMux * rtp_mux)
           "src"), "src");
   gst_pad_set_event_function (rtp_mux->srcpad,
       GST_DEBUG_FUNCPTR (gst_rtp_mux_src_event));
-  GST_PAD_SET_PROXY_CAPS (rtp_mux->srcpad);
+  gst_pad_use_fixed_caps (rtp_mux->srcpad);
   gst_element_add_pad (GST_ELEMENT (rtp_mux), rtp_mux->srcpad);
 
   rtp_mux->ssrc = DEFAULT_SSRC;
index 6f316f1..11ba979 100644 (file)
@@ -161,6 +161,10 @@ test_basic (const gchar * elem_name, const gchar * sink2, int count,
       "seqnum-offset", G_TYPE_UINT, 56, "timestamp-offset", G_TYPE_UINT, 57,
       "ssrc", G_TYPE_UINT, 66, NULL);
   fail_unless (gst_pad_set_caps (src1, caps));
+  gst_caps_unref (caps);
+
+  caps = gst_pad_peer_query_caps (sink, NULL);
+  fail_if (gst_caps_is_empty (caps));
 
   gst_segment_init (&segment, GST_FORMAT_TIME);
   segment.start = 100000;