[FFmpeg-devel] [PATCH] avfilter/showcqt: BASEFREQ and ENDFREQ cast to double

Muhammad Faiz mfcc64 at gmail.com
Mon Nov 30 16:43:23 CET 2015


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

patch attached
-------------- next part --------------
From 26d93c48b7c89849bfd962fbc66069c24f11e752 Mon Sep 17 00:00:00 2001
From: Muhammad Faiz <mfcc64 at gmail.com>
Date: Mon, 30 Nov 2015 22:20:30 +0700
Subject: [PATCH] avfilter/showcqt: BASEFREQ and ENDFREQ cast to double

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
---
 libavfilter/avf_showcqt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index d6e2928..712a999 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -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);
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list