mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
gst/gstcaps.c: Fix bug in fixating lists.
Original commit message from CVS: * gst/gstcaps.c: (gst_caps_structure_fixate_field_nearest_int), (gst_caps_structure_fixate_field_nearest_double): Fix bug in fixating lists.
This commit is contained in:
parent
4e3489c2e5
commit
b3a5ebd27c
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-04-13 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
|
* gst/gstcaps.c: (gst_caps_structure_fixate_field_nearest_int),
|
||||||
|
(gst_caps_structure_fixate_field_nearest_double): Fix bug in
|
||||||
|
fixating lists.
|
||||||
|
|
||||||
2004-04-12 David Schleef <ds@schleef.org>
|
2004-04-12 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
|
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
|
||||||
|
|
|
@ -1257,7 +1257,7 @@ gst_caps_structure_fixate_field_nearest_int (GstStructure * structure,
|
||||||
if (G_VALUE_TYPE (list_value) == G_TYPE_INT) {
|
if (G_VALUE_TYPE (list_value) == G_TYPE_INT) {
|
||||||
int x = g_value_get_int (list_value);
|
int x = g_value_get_int (list_value);
|
||||||
|
|
||||||
if (best_index == -1 || (ABS (target - x) < ABS (best - x))) {
|
if (best_index == -1 || (ABS (target - x) < ABS (target - best))) {
|
||||||
best_index = i;
|
best_index = i;
|
||||||
best = x;
|
best = x;
|
||||||
}
|
}
|
||||||
|
@ -1320,7 +1320,7 @@ gst_caps_structure_fixate_field_nearest_double (GstStructure * structure,
|
||||||
if (G_VALUE_TYPE (list_value) == G_TYPE_DOUBLE) {
|
if (G_VALUE_TYPE (list_value) == G_TYPE_DOUBLE) {
|
||||||
double x = g_value_get_double (list_value);
|
double x = g_value_get_double (list_value);
|
||||||
|
|
||||||
if (best_index == -1 || (ABS (target - x) < ABS (best - x))) {
|
if (best_index == -1 || (ABS (target - x) < ABS (target - best))) {
|
||||||
best_index = i;
|
best_index = i;
|
||||||
best = x;
|
best = x;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue