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
This commit is contained in:
Olivier Crête 2010-05-11 13:18:42 -04:00 committed by Wim Taymans
parent 3cfd7968b4
commit 28f509fdca

View file

@ -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;
}
no_delivery_method:
{
GST_ERROR_OBJECT (rtptheoradepay, "no delivery-method specified");
return FALSE;
}
no_configuration:
{
GST_ERROR_OBJECT (rtptheoradepay, "no configuration specified");