On Tue, 29 Apr 2014, Anton Khirnov wrote:
--- tests/tiny_psnr.c | 5 +++++ 1 file changed, 5 insertions(+)diff --git a/tests/tiny_psnr.c b/tests/tiny_psnr.c index 66eaf82..0055ffc 100644 --- a/tests/tiny_psnr.c +++ b/tests/tiny_psnr.c @@ -223,6 +223,11 @@ int main(int argc, char *argv[]) a = get_f32l(buf[0] + j); b = get_f32l(buf[1] + j); } + if (!isfinite(a) || !isfinite(b)) { + fprintf(stderr, "Invalid values in the input.\n"); + return 1; + } + dist = fabs(a - b); sse_d += (a - b) * (a - b); if (dist > maxdist_d) -- 1.7.10.4
Having a fallback in libavutil/libm.h doesn't help here. Note that configure only checks for isfinite (and the others in MATH_FUNCS) on the target, while tiny_psnr is built for the host.
// Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
