rtspsrc: Don't include payload type in the caps for framesize
When the sdp media attribute framesize are converted to caps the <payload> should not be included. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725335
This commit is contained in:
parent
38bf3d3808
commit
398296d978
@ -1902,6 +1902,8 @@ gst_rtspsrc_sdp_attributes_to_caps (GArray * attributes, GstCaps * caps)
|
|||||||
continue;
|
continue;
|
||||||
if (!strcmp (key, "range"))
|
if (!strcmp (key, "range"))
|
||||||
continue;
|
continue;
|
||||||
|
if (!strcmp (key, "framesize"))
|
||||||
|
continue;
|
||||||
if (g_str_equal (key, "key-mgmt")) {
|
if (g_str_equal (key, "key-mgmt")) {
|
||||||
parse_keymgmt (attr->value, caps);
|
parse_keymgmt (attr->value, caps);
|
||||||
continue;
|
continue;
|
||||||
@ -1949,6 +1951,7 @@ rtsp_get_attribute_for_pt (const GstSDPMedia * media, const gchar * name,
|
|||||||
* Mapping of caps to and from SDP fields:
|
* Mapping of caps to and from SDP fields:
|
||||||
*
|
*
|
||||||
* a=rtpmap:<payload> <encoding_name>/<clock_rate>[/<encoding_params>]
|
* a=rtpmap:<payload> <encoding_name>/<clock_rate>[/<encoding_params>]
|
||||||
|
* a=framesize:<payload> <width>-<height>
|
||||||
* a=fmtp:<payload> <param>[=<value>];...
|
* a=fmtp:<payload> <param>[=<value>];...
|
||||||
*/
|
*/
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
@ -1957,6 +1960,7 @@ gst_rtspsrc_media_to_caps (gint pt, const GstSDPMedia * media)
|
|||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
const gchar *rtpmap;
|
const gchar *rtpmap;
|
||||||
const gchar *fmtp;
|
const gchar *fmtp;
|
||||||
|
const gchar *framesize;
|
||||||
gchar *name = NULL;
|
gchar *name = NULL;
|
||||||
gint rate = -1;
|
gint rate = -1;
|
||||||
gchar *params = NULL;
|
gchar *params = NULL;
|
||||||
@ -2070,6 +2074,19 @@ gst_rtspsrc_media_to_caps (gint pt, const GstSDPMedia * media)
|
|||||||
g_strfreev (pairs);
|
g_strfreev (pairs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* parse framesize: field */
|
||||||
|
if ((framesize = gst_sdp_media_get_attribute_val (media, "framesize"))) {
|
||||||
|
gchar *p;
|
||||||
|
|
||||||
|
/* p is now of the format <payload> <width>-<height> */
|
||||||
|
p = (gchar *) framesize;
|
||||||
|
|
||||||
|
PARSE_INT (p, " ", payload);
|
||||||
|
if (payload != -1 && payload == pt) {
|
||||||
|
gst_structure_set (s, "a-framesize", G_TYPE_STRING, p, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
return caps;
|
return caps;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user