[FFmpeg-devel,3/4] avfilter/vf_identify: remove unnecessary check

Message ID 1619700601-9307-3-git-send-email-lance.lmwang@gmail.com
State Accepted
Commit d150a9eb444e672e0109b3ea1a04cf34522da51e
Headers
Series [FFmpeg-devel,1/4] avfilter/vf_ssim: remove unnecessary check |

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

Lance Wang April 29, 2021, 12:50 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavfilter/vf_identity.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Paul B Mahol April 29, 2021, 4:24 p.m. UTC | #1
commit log/message is wrong

On Thu, Apr 29, 2021 at 3:16 PM <lance.lmwang@gmail.com> wrote:

> From: Limin Wang <lance.lmwang@gmail.com>
>
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavfilter/vf_identity.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c
> index 4e0a44d..c81c40a 100644
> --- a/libavfilter/vf_identity.c
> +++ b/libavfilter/vf_identity.c
> @@ -296,7 +296,7 @@ static int config_input_ref(AVFilterLink *inlink)
>      if (!s->scores)
>          return AVERROR(ENOMEM);
>
> -    for (int t = 0; t < s->nb_threads && s->scores; t++) {
> +    for (int t = 0; t < s->nb_threads; t++) {
>          s->scores[t] = av_calloc(s->nb_components, sizeof(*s->scores[0]));
>          if (!s->scores[t])
>              return AVERROR(ENOMEM);
> --
> 1.8.3.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
  
Lance Wang April 30, 2021, 1:32 a.m. UTC | #2
On Thu, Apr 29, 2021 at 06:24:02PM +0200, Paul B Mahol wrote:
> commit log/message is wrong

Sorry, I'm not sure what's wrong, check -> checks?  what's your suggestion?

> 
> On Thu, Apr 29, 2021 at 3:16 PM <lance.lmwang@gmail.com> wrote:
> 
> > From: Limin Wang <lance.lmwang@gmail.com>
> >
> > Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> > ---
> >  libavfilter/vf_identity.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c
> > index 4e0a44d..c81c40a 100644
> > --- a/libavfilter/vf_identity.c
> > +++ b/libavfilter/vf_identity.c
> > @@ -296,7 +296,7 @@ static int config_input_ref(AVFilterLink *inlink)
> >      if (!s->scores)
> >          return AVERROR(ENOMEM);
> >
> > -    for (int t = 0; t < s->nb_threads && s->scores; t++) {
> > +    for (int t = 0; t < s->nb_threads; t++) {
> >          s->scores[t] = av_calloc(s->nb_components, sizeof(*s->scores[0]));
> >          if (!s->scores[t])
> >              return AVERROR(ENOMEM);
> > --
> > 1.8.3.1
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> >
  
Paul B Mahol April 30, 2021, 4:59 p.m. UTC | #3
filter name is wrong

On Fri, Apr 30, 2021 at 3:32 AM <lance.lmwang@gmail.com> wrote:

> On Thu, Apr 29, 2021 at 06:24:02PM +0200, Paul B Mahol wrote:
> > commit log/message is wrong
>
> Sorry, I'm not sure what's wrong, check -> checks?  what's your suggestion?
>
> >
> > On Thu, Apr 29, 2021 at 3:16 PM <lance.lmwang@gmail.com> wrote:
> >
> > > From: Limin Wang <lance.lmwang@gmail.com>
> > >
> > > Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> > > ---
> > >  libavfilter/vf_identity.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c
> > > index 4e0a44d..c81c40a 100644
> > > --- a/libavfilter/vf_identity.c
> > > +++ b/libavfilter/vf_identity.c
> > > @@ -296,7 +296,7 @@ static int config_input_ref(AVFilterLink *inlink)
> > >      if (!s->scores)
> > >          return AVERROR(ENOMEM);
> > >
> > > -    for (int t = 0; t < s->nb_threads && s->scores; t++) {
> > > +    for (int t = 0; t < s->nb_threads; t++) {
> > >          s->scores[t] = av_calloc(s->nb_components,
> sizeof(*s->scores[0]));
> > >          if (!s->scores[t])
> > >              return AVERROR(ENOMEM);
> > > --
> > > 1.8.3.1
> > >
> > > _______________________________________________
> > > ffmpeg-devel mailing list
> > > ffmpeg-devel@ffmpeg.org
> > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >
> > > To unsubscribe, visit link above, or email
> > > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> > >
>
> --
> Thanks,
> Limin Wang
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
  
Lance Wang May 1, 2021, 12:42 a.m. UTC | #4
On Fri, Apr 30, 2021 at 06:59:52PM +0200, Paul B Mahol wrote:

> filter name is wrong

thanks, will fix the typo

> 
> On Fri, Apr 30, 2021 at 3:32 AM <lance.lmwang@gmail.com> wrote:
> 
> > On Thu, Apr 29, 2021 at 06:24:02PM +0200, Paul B Mahol wrote:
> > > commit log/message is wrong
> >
> > Sorry, I'm not sure what's wrong, check -> checks?  what's your suggestion?
> >
> > >
> > > On Thu, Apr 29, 2021 at 3:16 PM <lance.lmwang@gmail.com> wrote:
> > >
> > > > From: Limin Wang <lance.lmwang@gmail.com>
> > > >
> > > > Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> > > > ---
> > > >  libavfilter/vf_identity.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c
> > > > index 4e0a44d..c81c40a 100644
> > > > --- a/libavfilter/vf_identity.c
> > > > +++ b/libavfilter/vf_identity.c
> > > > @@ -296,7 +296,7 @@ static int config_input_ref(AVFilterLink *inlink)
> > > >      if (!s->scores)
> > > >          return AVERROR(ENOMEM);
> > > >
> > > > -    for (int t = 0; t < s->nb_threads && s->scores; t++) {
> > > > +    for (int t = 0; t < s->nb_threads; t++) {
> > > >          s->scores[t] = av_calloc(s->nb_components,
> > sizeof(*s->scores[0]));
> > > >          if (!s->scores[t])
> > > >              return AVERROR(ENOMEM);
> > > > --
> > > > 1.8.3.1
> > > >
> > > > _______________________________________________
> > > > ffmpeg-devel mailing list
> > > > ffmpeg-devel@ffmpeg.org
> > > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > > >
> > > > To unsubscribe, visit link above, or email
> > > > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> > > >
> >
> > --
> > Thanks,
> > Limin Wang
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> >
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
  

Patch

diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c
index 4e0a44d..c81c40a 100644
--- a/libavfilter/vf_identity.c
+++ b/libavfilter/vf_identity.c
@@ -296,7 +296,7 @@  static int config_input_ref(AVFilterLink *inlink)
     if (!s->scores)
         return AVERROR(ENOMEM);
 
-    for (int t = 0; t < s->nb_threads && s->scores; t++) {
+    for (int t = 0; t < s->nb_threads; t++) {
         s->scores[t] = av_calloc(s->nb_components, sizeof(*s->scores[0]));
         if (!s->scores[t])
             return AVERROR(ENOMEM);