[vlc-devel] [PATCH] demux/xiph_metadata.c: fix bug causing redudant "extra" metadata

Filip Roséen filip at videolabs.io
Tue May 17 20:18:49 CEST 2016


On 16/05/17 19:47, Rémi Denis-Courmont wrote:

> >  #define IF_EXTRACT_FMT(txt,var,fmt,target) \
> > -    IF_EXTRACT(txt,var)\
> > -    if( fmt && !strncasecmp(psz_comment, txt, strlen(txt)) )\
> > +    if( !strncasecmp(psz_comment, txt, strlen(txt)) ) \
> > +    { \
> > +        IF_EXTRACT(txt,var)\
> > +        if( fmt )\
> >          {\
> >              if ( fmt->target ) free( fmt->target );\
> 
> Remove the if() while you´re at it.

Well-spotted (I was focusing on fixing the immediate issue), thanks!

See the attached patch on this email (which also removes the redundant check to
see whether `fmt->target` is not null).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160517/66d78dd5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-demux-xiph_metadata.c-fix-bug-causing-redudant-extra.patch
Type: text/x-diff
Size: 2283 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160517/66d78dd5/attachment.patch>


More information about the vlc-devel mailing list