[FFmpeg-devel] [PATCH V1 3/3] lavfi/af_asetnsamples: Remove the redundant condition check
Michael Niedermayer
michael at niedermayer.cc
Sun Jun 16 10:32:32 EEST 2019
On Sun, Jun 16, 2019 at 01:13:38AM +0800, Jun Zhao wrote:
> 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);
LGTM
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
"I am not trying to be anyone's saviour, I'm trying to think about the
future and not be sad" - Elon Musk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190616/7873390d/attachment.sig>
More information about the ffmpeg-devel
mailing list