[gst-devel] Bug in gst_caps_structure_fixate_field_nearest_int

Sebastien Cote sebas642 at yahoo.ca
Tue Apr 13 08:01:03 CEST 2004


I've found a bug in
gst_caps_structure_fixate_field_nearest_int() and
gst_caps_structure_fixate_field_nearest_double() in
GStreamer-0.8 but it is also present in CVS.

When looking for the best value, we have

        if (best_index == -1 || (ABS (target - x) <
ABS (best - x))) {
          best_index = i;
          best = x;

ABS(best - x) is wrong, it should be ABS(target -
best).  So these 2 functions almost never return the
expected result.

Should I open a bug on this or is it better to use
this mailing-list (or both)?



Post your free ad now! http://personals.yahoo.ca

More information about the gstreamer-devel mailing list