rtpopuspay: make caps writable before truncating them
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 19 Feb 2015 14:05:06 +0000 (14:05 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 17 Feb 2016 14:58:01 +0000 (14:58 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=737810

gst/rtp/gstrtpopuspay.c

index 7cd90eff634f18694f64f045a1a8ccdf48815741..eebbdee7661cf8a2a6d173837972469d13c1c848 100644 (file)
@@ -100,8 +100,8 @@ gst_rtp_opus_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
 
   src_caps = gst_pad_get_allowed_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload));
   if (src_caps) {
-    src_caps = gst_caps_truncate (src_caps);
     src_caps = gst_caps_make_writable (src_caps);
+    src_caps = gst_caps_truncate (src_caps);
     s = gst_caps_get_structure (src_caps, 0);
     gst_structure_fixate_field_string (s, "encoding-name",
         "X-GST-OPUS-DRAFT-SPITTKA-00");