avfilter/showcqt: BASEFREQ and ENDFREQ cast to double
authorMuhammad Faiz <mfcc64@gmail.com>
Mon, 30 Nov 2015 15:20:30 +0000 (22:20 +0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 7 Dec 2015 00:28:48 +0000 (01:28 +0100)
fix default basefreq/endfreq comparison
on platform that does not do comparison
in double type

found on zeranoe 32-bit build, where
default freq range is detected as non-default

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/avf_showcqt.c

index d6e2928..712a999 100644 (file)
@@ -466,7 +466,7 @@ static int init_axis_color(ShowCQTContext *s, AVFrame *tmp)
     double *freq = NULL;
     int x, y, ret;
 
-    if (s->basefreq != BASEFREQ || s->endfreq != ENDFREQ) {
+    if (s->basefreq != (double) BASEFREQ || s->endfreq != (double) ENDFREQ) {
         av_log(s->ctx, AV_LOG_WARNING, "font axis rendering is not implemented in non-default frequency range,"
                " please use axisfile option instead.\n");
         return AVERROR(EINVAL);