gst/gstvalue.c: Fix wrong function calls for arrays.

Original commit message from CVS:
2005-11-21  Julien MOUTTE  <julien@moutte.net>

* gst/gstvalue.c: (gst_value_intersect_array): Fix wrong
function calls for arrays.
This commit is contained in:
Julien Moutte 2005-11-21 14:52:56 +00:00
parent b06c505f1c
commit 9185b7092c
2 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2005-11-21 Julien MOUTTE <julien@moutte.net>
* gst/gstvalue.c: (gst_value_intersect_array): Fix wrong
function calls for arrays.
2005-11-21 Stefan Kost <ensonic@users.sf.net>
* docs/random/ensonic/media-device-daemon.txt:

View file

@ -1851,18 +1851,18 @@ gst_value_intersect_array (GValue * dest, const GValue * src1,
GValue val = { 0 };
/* only works on similar-sized arrays */
size = gst_value_list_get_size (src1);
if (size != gst_value_list_get_size (src2))
size = gst_value_array_get_size (src1);
if (size != gst_value_array_get_size (src2))
return FALSE;
g_value_init (dest, GST_TYPE_ARRAY);
for (n = 0; n < size; n++) {
if (!gst_value_intersect (&val, gst_value_list_get_value (src1, n),
gst_value_list_get_value (src2, n))) {
if (!gst_value_intersect (&val, gst_value_array_get_value (src1, n),
gst_value_array_get_value (src2, n))) {
g_value_unset (dest);
return FALSE;
}
gst_value_list_append_value (dest, &val);
gst_value_array_append_value (dest, &val);
g_value_unset (&val);
}