diff --git a/gst-libs/gst/sdp/gstsdpmessage.c b/gst-libs/gst/sdp/gstsdpmessage.c index a3fb942a0d..65a7f7549b 100644 --- a/gst-libs/gst/sdp/gstsdpmessage.c +++ b/gst-libs/gst/sdp/gstsdpmessage.c @@ -570,7 +570,7 @@ gst_sdp_message_as_text (const GstSDPMessage * msg) if (attr->key) { g_string_append_printf (lines, "a=%s", attr->key); - if (attr->value) + if (attr->value && attr->value[0] != '\0') g_string_append_printf (lines, ":%s", attr->value); g_string_append_printf (lines, "\r\n"); } diff --git a/tests/check/libs/sdp.c b/tests/check/libs/sdp.c index 7da67ead94..b6f1d9ce13 100644 --- a/tests/check/libs/sdp.c +++ b/tests/check/libs/sdp.c @@ -53,6 +53,7 @@ static const gchar *sdp = "v=0\r\n" "s=TestSessionToCopy\r\n" "c=IN IP4 127.0.0.1\r\n" "t=0 0\r\n" + "a=sendrecv\r\n" "m=video 3434 RTP/AVP 96 97 99\r\n" "a=rtpmap:96 MP4V-ES/90000\r\n" "a=rtpmap:97 H263-1998/90000\r\n"