On 05/23/2011 04:38 AM, Martin Storsjö wrote: > For fractions and doubles, returning 0.0/0.0 was intentional, > in order to return NaN - the division should be ok since > it's done in float. NaN is better than -1 for indicating a > value not found. > > Keeping the return value check for av_get_int.
Somehow returning both an error code and setting the output values to a separate error value seems wrong to me, especially if they're used differently by different calling functions. What seems simplest to me would be: 1) do not modify num/den on error in av_get_number() 2) check for -1 in the calling functions 3) return approprate value for the calling function if -1 was returned by av_get_number(), be it -1, 0/0, NaN or whatever. -Justin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
