[FFmpeg-devel] [PATCH V1 3/3] lavfi/af_asetnsamples: Remove the redundant condition check

Jun Zhao mypopydev at gmail.com
Sat Jun 15 20:13:38 EEST 2019


From: Jun Zhao <barryjzhao at tencent.com>

Redundant condition: '!A || B' is equivalent to '!A || (A && B)' but
more clearly.

Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
---
 libavfilter/af_asetnsamples.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavfilter/af_asetnsamples.c b/libavfilter/af_asetnsamples.c
index a7e424f..bbc391a 100644
--- a/libavfilter/af_asetnsamples.c
+++ b/libavfilter/af_asetnsamples.c
@@ -67,7 +67,7 @@ static int activate(AVFilterContext *ctx)
         return ret;
 
     if (ret > 0) {
-        if ((!s->pad || (s->pad && frame->nb_samples == s->nb_out_samples))) {
+        if (!s->pad || frame->nb_samples == s->nb_out_samples) {
             ret = ff_filter_frame(outlink, frame);
             if (ff_inlink_queued_samples(inlink) >= s->nb_out_samples)
                 ff_filter_set_ready(ctx, 100);
-- 
1.7.1



More information about the ffmpeg-devel mailing list