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.
parent 3cfd7968
......@@ -315,12 +315,10 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
/* see how the configuration parameters will be transmitted */
delivery_method = gst_structure_get_string (structure, "delivery-method");
if (delivery_method == NULL)
goto no_delivery_method;
/* read and parse configuration string */
configuration = gst_structure_get_string (structure, "configuration");
if (!g_ascii_strcasecmp (delivery_method, "inline")) {
if (configuration) {
GstBuffer *confbuf;
guint8 *data;
gsize size;
......@@ -339,7 +337,8 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
if (!gst_rtp_theora_depay_parse_configuration (rtptheoradepay, confbuf))
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 */
GST_DEBUG_OBJECT (rtptheoradepay, "expecting in_band configuration");
} else if (g_str_has_prefix (delivery_method, "out_band/")) {
......@@ -365,11 +364,6 @@ unsupported_delivery_method:
"unsupported delivery-method \"%s\" specified", delivery_method);
return FALSE;
GST_ERROR_OBJECT (rtptheoradepay, "no delivery-method specified");
return FALSE;
GST_ERROR_OBJECT (rtptheoradepay, "no configuration specified");
Supports Markdown
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