diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2010-05-11 13:18:42 -0400 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-05-13 12:22:36 +0200 |
commit | 28f509fdcab42eec863bf8ab2481b0019cc0d771 (patch) | |
tree | 6cbe59d92b53f35cc9eb844f746facc5d4f9ad5c | |
parent | 3cfd7968b453f3a5a97ba43a392ef22acbf9c327 (diff) |
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
-rw-r--r-- | gst/rtp/gstrtptheoradepay.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gst/rtp/gstrtptheoradepay.c b/gst/rtp/gstrtptheoradepay.c index 860a1137e..2e281bff9 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"); |