diff mbox series

[FFmpeg-devel] lavfi/signature: fix always true expression

Message ID 20210524010024.4928-1-val.zapod.vz@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel] lavfi/signature: fix always true expression | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Valerii Zapodovnikov May 24, 2021, 1 a.m. UTC
Otherwise since "==" has higher precedence, mode is never checked.
---
 libavfilter/signature_lookup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Valerii Zapodovnikov June 5, 2021, 6:27 p.m. UTC | #1
пн, 24 мая 2021 г., 4:00 Valerii Zapodovnikov <val.zapod.vz@gmail.com>:

> Otherwise since "==" has higher precedence, mode is never checked.
> ---
>  libavfilter/signature_lookup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/signature_lookup.c
> b/libavfilter/signature_lookup.c
> index 272c717c77..85e879d224 100644
> --- a/libavfilter/signature_lookup.c
> +++ b/libavfilter/signature_lookup.c
> @@ -491,7 +491,7 @@ static MatchingInfo
> evaluate_parameters(AVFilterContext *ctx, SignatureContext *
>          meandist = (double) goodfcount / (double) distsum;
>
>          if (meandist < minmeandist ||
> -                status == STATUS_END_REACHED | STATUS_BEGIN_REACHED ||
> +                status == (STATUS_END_REACHED | STATUS_BEGIN_REACHED) ||
>                  mode == MODE_FAST){
>              minmeandist = meandist;
>              /* bestcandidate in this iteration */
> --
> 2.30.2
>

Ping. And sorry for duplication. I did it, not patchwork or whatever :(

>
Jai Luthra July 24, 2021, 10:47 p.m. UTC | #2
On Mon, May 24, 2021 at 04:00:24AM +0300, Valerii Zapodovnikov wrote:
>Otherwise since "==" has higher precedence, mode is never checked.
>---
> libavfilter/signature_lookup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/libavfilter/signature_lookup.c b/libavfilter/signature_lookup.c
>index 272c717c77..85e879d224 100644
>--- a/libavfilter/signature_lookup.c
>+++ b/libavfilter/signature_lookup.c
>@@ -491,7 +491,7 @@ static MatchingInfo evaluate_parameters(AVFilterContext *ctx, SignatureContext *
>         meandist = (double) goodfcount / (double) distsum;
>
>         if (meandist < minmeandist ||
>-                status == STATUS_END_REACHED | STATUS_BEGIN_REACHED ||
>+                status == (STATUS_END_REACHED | STATUS_BEGIN_REACHED) ||
>                 mode == MODE_FAST){
>             minmeandist = meandist;
>             /* bestcandidate in this iteration */

will apply thx!
diff mbox series

Patch

diff --git a/libavfilter/signature_lookup.c b/libavfilter/signature_lookup.c
index 272c717c77..85e879d224 100644
--- a/libavfilter/signature_lookup.c
+++ b/libavfilter/signature_lookup.c
@@ -491,7 +491,7 @@  static MatchingInfo evaluate_parameters(AVFilterContext *ctx, SignatureContext *
         meandist = (double) goodfcount / (double) distsum;
 
         if (meandist < minmeandist ||
-                status == STATUS_END_REACHED | STATUS_BEGIN_REACHED ||
+                status == (STATUS_END_REACHED | STATUS_BEGIN_REACHED) ||
                 mode == MODE_FAST){
             minmeandist = meandist;
             /* bestcandidate in this iteration */