mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +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_params = gst_structure_get_string (s, "encoding-params");
|
||||
|
||||
if (caps_params)
|
||||
tmp = g_strdup_printf ("%d %s/%d/%s", caps_pt, caps_enc, caps_rate,
|
||||
if (caps_enc) {
|
||||
if (caps_params)
|
||||
tmp = g_strdup_printf ("%d %s/%d/%s", caps_pt, caps_enc, caps_rate,
|
||||
caps_params);
|
||||
else
|
||||
tmp = g_strdup_printf ("%d %s/%d", caps_pt, caps_enc, caps_rate);
|
||||
else
|
||||
tmp = g_strdup_printf ("%d %s/%d", caps_pt, caps_enc, caps_rate);
|
||||
|
||||
gst_sdp_media_add_attribute (smedia, "rtpmap", tmp);
|
||||
g_free (tmp);
|
||||
gst_sdp_media_add_attribute (smedia, "rtpmap", tmp);
|
||||
g_free (tmp);
|
||||
}
|
||||
|
||||
/* the config uri */
|
||||
tmp = g_strdup_printf ("stream=%d", i);
|
||||
|
|
Loading…
Reference in a new issue