[gst-devel] Re: Bug in gst_caps_structure_fixate_field_nearest_int

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


Oh!  I forgot to mention that this bug shows up only
when a list of values is passed to these functions.

 --- Sebastien Cote <sebas642 at yahoo.ca> wrote: > Hi,
> 
> 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)?
> 
> Thanks,
> 
> Sebastien
> 
> 
>
______________________________________________________________________
> 
> Post your free ad now! http://personals.yahoo.ca
>  

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




More information about the gstreamer-devel mailing list