sdpdemux: Set caps to application/x-rtp instead of application/x-unknown as returned by the SDP helpers

The SDP helpers can't know if this is going to be RTP, SRTP, or ....

https://bugzilla.gnome.org/show_bug.cgi?id=762860
This commit is contained in:
Sebastian Dröge 2016-02-29 11:53:19 +02:00
parent cbfbc6ed88
commit 019bc67837

View file

@ -393,10 +393,15 @@ gst_sdp_demux_create_stream (GstSDPDemux * demux, GstSDPMessage * sdp, gint idx)
/* we must have a payload. No payload means we cannot create caps */
/* FIXME, handle multiple formats. */
if ((payload = gst_sdp_media_get_format (media, 0))) {
GstStructure *s;
stream->pt = atoi (payload);
/* convert caps */
stream->caps = gst_sdp_media_get_caps_from_media (media, stream->pt);
s = gst_caps_get_structure (stream->caps, 0);
gst_structure_set_name (s, "application/x-rtp");
if (stream->pt >= 96) {
/* If we have a dynamic payload type, see if we have a stream with the
* same payload number. If there is one, they are part of the same