rtspsrc: set RTCP caps on the RTCP pads

This commit is contained in:
Wim Taymans 2013-05-28 12:24:37 +02:00
parent 63f0ecbbe7
commit e6f850996b

View file

@ -2911,6 +2911,8 @@ gst_rtspsrc_stream_configure_mcast (GstRTSPSrc * src, GstRTSPStream * stream,
/* creating another UDP source for RTCP */ /* creating another UDP source for RTCP */
if (max != -1) { if (max != -1) {
GstCaps *caps;
uri = g_strdup_printf ("udp://%s:%d", destination, max); uri = g_strdup_printf ("udp://%s:%d", destination, max);
stream->udpsrc[1] = stream->udpsrc[1] =
gst_element_make_from_uri (GST_URI_SRC, uri, NULL, NULL); gst_element_make_from_uri (GST_URI_SRC, uri, NULL, NULL);
@ -2918,6 +2920,10 @@ gst_rtspsrc_stream_configure_mcast (GstRTSPSrc * src, GstRTSPStream * stream,
if (stream->udpsrc[1] == NULL) if (stream->udpsrc[1] == NULL)
goto no_element; goto no_element;
caps = gst_caps_new_empty_simple ("application/x-rtcp");
g_object_set (stream->udpsrc[1], "caps", caps, NULL);
gst_caps_unref (caps);
/* take ownership */ /* take ownership */
gst_object_ref_sink (stream->udpsrc[1]); gst_object_ref_sink (stream->udpsrc[1]);
@ -2993,8 +2999,14 @@ gst_rtspsrc_stream_configure_udp (GstRTSPSrc * src, GstRTSPStream * stream,
/* RTCP port */ /* RTCP port */
if (stream->udpsrc[1]) { if (stream->udpsrc[1]) {
GstCaps *caps;
gst_bin_add (GST_BIN_CAST (src), stream->udpsrc[1]); gst_bin_add (GST_BIN_CAST (src), stream->udpsrc[1]);
caps = gst_caps_new_empty_simple ("application/x-rtcp");
g_object_set (stream->udpsrc[1], "caps", caps, NULL);
gst_caps_unref (caps);
if (stream->channelpad[1]) { if (stream->channelpad[1]) {
GstPad *pad; GstPad *pad;