flitetestsrc: fix caps fixation
authorTim-Philipp Müller <tim@centricular.net>
Thu, 13 Sep 2012 00:34:45 +0000 (01:34 +0100)
committerTim-Philipp Müller <tim@centricular.net>
Thu, 13 Sep 2012 00:34:45 +0000 (01:34 +0100)
Make caps writable before changing them.

ext/flite/gstflitetestsrc.c

index e7efc20..15bcaab 100644 (file)
@@ -177,6 +177,9 @@ gst_flite_test_src_fixate (GstBaseSrc * bsrc, GstCaps * caps)
   GstStructure *structure;
   gint channels;
 
+  caps = gst_caps_truncate (caps);
+  caps = gst_caps_make_writable (caps);
+
   structure = gst_caps_get_structure (caps, 0);
 
   gst_structure_fixate_field_nearest_int (structure, "channels", 2);