flacenc: audio caps have a *list* of formats, not an array of formats
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 22 Feb 2012 17:03:42 +0000 (17:03 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 22 Feb 2012 17:03:42 +0000 (17:03 +0000)
A list of things in caps is something where one is picked in the
course of negotiation. An array is always something that only makes
sense as a whole in that order.

ext/flac/gstflacenc.c

index cec2648..fedf818 100644 (file)
@@ -616,26 +616,26 @@ gst_flac_enc_getcaps (GstAudioEncoder * enc, GstCaps * filter)
     ret = gst_pad_get_current_caps (pad);
   } else {
     gint i;
-    GValue v_arr = { 0, };
+    GValue v_list = { 0, };
     GValue v = { 0, };
     GstStructure *s, *s2;
 
-    g_value_init (&v_arr, GST_TYPE_ARRAY);
+    g_value_init (&v_list, GST_TYPE_LIST);
     g_value_init (&v, G_TYPE_STRING);
 
     g_value_set_string (&v, GST_AUDIO_NE (S8));
-    gst_value_array_append_value (&v_arr, &v);
+    gst_value_list_append_value (&v_list, &v);
     g_value_set_string (&v, GST_AUDIO_NE (S16));
-    gst_value_array_append_value (&v_arr, &v);
+    gst_value_list_append_value (&v_list, &v);
     g_value_set_string (&v, GST_AUDIO_NE (S24));
-    gst_value_array_append_value (&v_arr, &v);
+    gst_value_list_append_value (&v_list, &v);
     g_value_set_string (&v, GST_AUDIO_NE (S32));
-    gst_value_array_append_value (&v_arr, &v);
+    gst_value_list_append_value (&v_list, &v);
     g_value_unset (&v);
 
     s = gst_structure_new_empty ("audio/x-raw");
-    gst_structure_set_value (s, "format", &v_arr);
-    g_value_unset (&v_arr);
+    gst_structure_set_value (s, "format", &v_list);
+    g_value_unset (&v_list);
 
     gst_structure_set (s, "layout", G_TYPE_STRING, "interleaved",
         "rate", GST_TYPE_INT_RANGE, 1, 655350, NULL);