diff --git a/ChangeLog b/ChangeLog index ca60622acc..6682d760bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-08-14 Julien MOUTTE + + * gst/gstindex.c: (gst_index_add_association): Fix index entry + generation from vargs. Fixes #466595. + 2007-08-14 Wim Taymans * gst/gstbin.c: (gst_bin_element_set_state): diff --git a/gst/gstindex.c b/gst/gstindex.c index a7681b5cbf..7b2a73dad0 100644 --- a/gst/gstindex.c +++ b/gst/gstindex.c @@ -736,22 +736,26 @@ gst_index_add_association (GstIndex * index, gint id, GstAssocFlags flags, array = g_array_new (FALSE, FALSE, sizeof (GstIndexAssociation)); - va_start (args, value); - - cur_format = format; - n_assocs = 0; - while (cur_format) { + { GstIndexAssociation a; - n_assocs++; - cur_format = va_arg (args, GstFormat); - if (cur_format) { - a.format = cur_format; - a.value = va_arg (args, gint64); - - g_array_append_val (array, a); - } + a.format = format; + a.value = value; + n_assocs = 1; + g_array_append_val (array, a); } + + va_start (args, value); + + while ((cur_format = va_arg (args, GstFormat))) { + GstIndexAssociation a; + + a.format = cur_format; + a.value = va_arg (args, gint64); + n_assocs++; + g_array_append_val (array, a); + } + va_end (args); list = (GstIndexAssociation *) g_array_free (array, FALSE);