[vlc-devel] [PATCH] meta: merge only meta data not previously inserted

Lukas Solanka lsolanka at gmail.com
Wed Mar 22 23:19:02 CET 2017


On 22 March 2017 at 08:43, Rémi Denis-Courmont <remi at remlab.net> wrote:

> Le tiistaina 21. maaliskuuta 2017, 23.21.14 EET Lukas Solanka a écrit :
> > This applies mostly to cue+single file flac situations when the flac file
> > does not have appropriate metadata. In those cases the track title coming
> > from the cue file is overwritten by the title from the flac file (usually
> > album name and not track name). This patch prevents that and keeps to
> > original metadata, but allows to insert new fields if necessary.
> > ---
> >  src/input/meta.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/input/meta.c b/src/input/meta.c
> > index 9b79d42..8bf0baf 100644
> > --- a/src/input/meta.c
> > +++ b/src/input/meta.c
> > @@ -181,7 +181,8 @@ void vlc_meta_Merge( vlc_meta_t *dst, const
> vlc_meta_t
> > *src )
> >
> >      for( int i = 0; i < VLC_META_TYPE_COUNT; i++ )
> >      {
> > -        if( src->ppsz_meta[i] )
> > +        /* Merge only meta not inserted before by someone else */
> > +        if( !dst->ppsz_meta[i] && src->ppsz_meta[i] )
> >          {
> >              free( dst->ppsz_meta[i] );
>
> This becomes a no-op.
>>
​Of course, yes, thanks.​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170322/671f4552/attachment.html>


More information about the vlc-devel mailing list