mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
gst/gstindex.c: Fix index entry generation from vargs. Fixes #466595.
Original commit message from CVS: 2007-08-14 Julien MOUTTE <julien@moutte.net> * gst/gstindex.c: (gst_index_add_association): Fix index entry generation from vargs. Fixes #466595.
This commit is contained in:
parent
9b24336ce5
commit
e3b911f7a9
2 changed files with 22 additions and 13 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-08-14 Julien MOUTTE <julien@moutte.net>
|
||||||
|
|
||||||
|
* gst/gstindex.c: (gst_index_add_association): Fix index entry
|
||||||
|
generation from vargs. Fixes #466595.
|
||||||
|
|
||||||
2007-08-14 Wim Taymans <wim.taymans@gmail.com>
|
2007-08-14 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
* gst/gstbin.c: (gst_bin_element_set_state):
|
* gst/gstbin.c: (gst_bin_element_set_state):
|
||||||
|
|
|
@ -736,22 +736,26 @@ gst_index_add_association (GstIndex * index, gint id, GstAssocFlags flags,
|
||||||
|
|
||||||
array = g_array_new (FALSE, FALSE, sizeof (GstIndexAssociation));
|
array = g_array_new (FALSE, FALSE, sizeof (GstIndexAssociation));
|
||||||
|
|
||||||
va_start (args, value);
|
{
|
||||||
|
|
||||||
cur_format = format;
|
|
||||||
n_assocs = 0;
|
|
||||||
while (cur_format) {
|
|
||||||
GstIndexAssociation a;
|
GstIndexAssociation a;
|
||||||
|
|
||||||
n_assocs++;
|
a.format = format;
|
||||||
cur_format = va_arg (args, GstFormat);
|
a.value = value;
|
||||||
if (cur_format) {
|
n_assocs = 1;
|
||||||
a.format = cur_format;
|
g_array_append_val (array, a);
|
||||||
a.value = va_arg (args, gint64);
|
|
||||||
|
|
||||||
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);
|
va_end (args);
|
||||||
|
|
||||||
list = (GstIndexAssociation *) g_array_free (array, FALSE);
|
list = (GstIndexAssociation *) g_array_free (array, FALSE);
|
||||||
|
|
Loading…
Reference in a new issue