mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
sdp: don't add encoding name when absent in caps
This commit is contained in:
parent
740d71bd50
commit
415e5e674b
1 changed files with 8 additions and 6 deletions
|
@ -87,14 +87,16 @@ gst_rtsp_sdp_from_media (GstRTSPMedia *media)
|
||||||
caps_enc = gst_structure_get_string (s, "encoding-name");
|
caps_enc = gst_structure_get_string (s, "encoding-name");
|
||||||
caps_params = gst_structure_get_string (s, "encoding-params");
|
caps_params = gst_structure_get_string (s, "encoding-params");
|
||||||
|
|
||||||
if (caps_params)
|
if (caps_enc) {
|
||||||
tmp = g_strdup_printf ("%d %s/%d/%s", caps_pt, caps_enc, caps_rate,
|
if (caps_params)
|
||||||
|
tmp = g_strdup_printf ("%d %s/%d/%s", caps_pt, caps_enc, caps_rate,
|
||||||
caps_params);
|
caps_params);
|
||||||
else
|
else
|
||||||
tmp = g_strdup_printf ("%d %s/%d", caps_pt, caps_enc, caps_rate);
|
tmp = g_strdup_printf ("%d %s/%d", caps_pt, caps_enc, caps_rate);
|
||||||
|
|
||||||
gst_sdp_media_add_attribute (smedia, "rtpmap", tmp);
|
gst_sdp_media_add_attribute (smedia, "rtpmap", tmp);
|
||||||
g_free (tmp);
|
g_free (tmp);
|
||||||
|
}
|
||||||
|
|
||||||
/* the config uri */
|
/* the config uri */
|
||||||
tmp = g_strdup_printf ("stream=%d", i);
|
tmp = g_strdup_printf ("stream=%d", i);
|
||||||
|
|
Loading…
Reference in a new issue