[FFmpeg-devel] [PATCH] lavfi: fix null checking in avfilter_config_links()

Michael Niedermayer michaelni at gmx.at
Mon Jan 21 00:06:22 CET 2013


On Sun, Jan 20, 2013 at 11:41:03PM +0100, Stefano Sabatini wrote:
> On date Sunday 2013-01-20 15:38:21 -0500, Xi Wang encoded:
> > Move the first use of `link' after the null pointer check.
> > 
> > Signed-off-by: Xi Wang <xi.wang at gmail.com>
> > ---
> >  libavfilter/avfilter.c |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
> > index 8c06173..4759d13 100644
> > --- a/libavfilter/avfilter.c
> > +++ b/libavfilter/avfilter.c
> > @@ -222,11 +222,11 @@ int avfilter_config_links(AVFilterContext *filter)
> >  
> >      for (i = 0; i < filter->nb_inputs; i ++) {
> >          AVFilterLink *link = filter->inputs[i];
> > -        AVFilterLink *inlink = link->src->nb_inputs ?
> > -            link->src->inputs[0] : NULL;
> > +        AVFilterLink *inlink;
> >  
> >          if (!link) continue;
> >  
> > +        inlink = link->src->nb_inputs ? link->src->inputs[0] : NULL;
> 
> Sure, this is correct, thanks.

applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130121/2ba96f82/attachment.asc>


More information about the ffmpeg-devel mailing list