Commit 28f509fd authored by Olivier Crête's avatar Olivier Crête Committed by Wim Taymans
Browse files

rtptheoradepay: make delivery-method parameter optional

It probably will not be in the final RFC as it is not in RFC 5215 for Vorbis.
If there is a configuration specified, assume it is in-line and if nothing is
specified, assume it is in-band.

https://bugzilla.gnome.org/show_bug.cgi?id=618386
parent 3cfd7968
...@@ -315,12 +315,10 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) ...@@ -315,12 +315,10 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
/* see how the configuration parameters will be transmitted */ /* see how the configuration parameters will be transmitted */
delivery_method = gst_structure_get_string (structure, "delivery-method"); delivery_method = gst_structure_get_string (structure, "delivery-method");
if (delivery_method == NULL)
goto no_delivery_method;
/* read and parse configuration string */ /* read and parse configuration string */
configuration = gst_structure_get_string (structure, "configuration"); configuration = gst_structure_get_string (structure, "configuration");
if (!g_ascii_strcasecmp (delivery_method, "inline")) { if (configuration) {
GstBuffer *confbuf; GstBuffer *confbuf;
guint8 *data; guint8 *data;
gsize size; gsize size;
...@@ -339,7 +337,8 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) ...@@ -339,7 +337,8 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
if (!gst_rtp_theora_depay_parse_configuration (rtptheoradepay, confbuf)) if (!gst_rtp_theora_depay_parse_configuration (rtptheoradepay, confbuf))
goto invalid_configuration; goto invalid_configuration;
} else if (!g_ascii_strcasecmp (delivery_method, "in_band")) { } else if (!delivery_method ||
!g_ascii_strcasecmp (delivery_method, "in_band")) {
/* headers will (also) be transmitted in the RTP packets */ /* headers will (also) be transmitted in the RTP packets */
GST_DEBUG_OBJECT (rtptheoradepay, "expecting in_band configuration"); GST_DEBUG_OBJECT (rtptheoradepay, "expecting in_band configuration");
} else if (g_str_has_prefix (delivery_method, "out_band/")) { } else if (g_str_has_prefix (delivery_method, "out_band/")) {
...@@ -365,11 +364,6 @@ unsupported_delivery_method: ...@@ -365,11 +364,6 @@ unsupported_delivery_method:
"unsupported delivery-method \"%s\" specified", delivery_method); "unsupported delivery-method \"%s\" specified", delivery_method);
return FALSE; return FALSE;
} }
no_delivery_method:
{
GST_ERROR_OBJECT (rtptheoradepay, "no delivery-method specified");
return FALSE;
}
no_configuration: no_configuration:
{ {
GST_ERROR_OBJECT (rtptheoradepay, "no configuration specified"); GST_ERROR_OBJECT (rtptheoradepay, "no configuration specified");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment