audioparsers: Make sure the caps are actually writable before changing them
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 17 Dec 2012 14:17:12 +0000 (15:17 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 17 Dec 2012 14:17:12 +0000 (15:17 +0100)
gst/audioparsers/gstaacparse.c
gst/audioparsers/gstac3parse.c
gst/audioparsers/gstamrparse.c
gst/audioparsers/gstdcaparse.c
gst/audioparsers/gstflacparse.c
gst/audioparsers/gstmpegaudioparse.c
gst/audioparsers/gstwavpackparse.c

index 322e94a..8f63b11 100644 (file)
@@ -1115,6 +1115,7 @@ gst_aac_parse_sink_getcaps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    res = gst_caps_make_writable (res);
 
     /* Append the template caps because we still want to accept
      * caps without any fields in the case upstream does not
index b9bc96e..853ffc5 100644 (file)
@@ -715,6 +715,7 @@ gst_ac3_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    res = gst_caps_make_writable (res);
 
     /* Append the template caps because we still want to accept
      * caps without any fields in the case upstream does not
index 39b68e0..1a32152 100644 (file)
@@ -389,6 +389,7 @@ gst_amr_parse_sink_getcaps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    res = gst_caps_make_writable (res);
     /* Append the template caps because we still want to accept
      * caps without any fields in the case upstream does not
      * know anything.
index 1ae0c03..2abae88 100644 (file)
@@ -463,6 +463,7 @@ gst_dca_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    res = gst_caps_make_writable (res);
 
     /* Append the template caps because we still want to accept
      * caps without any fields in the case upstream does not
index 154b749..777aeab 100644 (file)
@@ -1757,6 +1757,7 @@ gst_flac_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    res = gst_caps_make_writable (res);
 
     /* Append the template caps because we still want to accept
      * caps without any fields in the case upstream does not
index bbdf199..aaa9349 100644 (file)
@@ -1421,6 +1421,7 @@ gst_mpeg_audio_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    res = gst_caps_make_writable (res);
 
     /* Append the template caps because we still want to accept
      * caps without any fields in the case upstream does not
index f0c0340..8f124dd 100644 (file)
@@ -631,6 +631,7 @@ gst_wavpack_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    res = gst_caps_make_writable (res);
 
     /* Append the template caps because we still want to accept
      * caps without any fields in the case upstream does not