From 28f509fdcab42eec863bf8ab2481b0019cc0d771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 11 May 2010 13:18:42 -0400 Subject: [PATCH] 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 --- gst/rtp/gstrtptheoradepay.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/gst/rtp/gstrtptheoradepay.c b/gst/rtp/gstrtptheoradepay.c index 860a1137e1..2e281bff92 100644 --- a/gst/rtp/gstrtptheoradepay.c +++ b/gst/rtp/gstrtptheoradepay.c @@ -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");