[vlc-devel] [PATCH] meta: merge only meta data not previously inserted
Jean-Baptiste Kempf
jb at videolan.org
Wed Mar 22 08:48:06 CET 2017
Hello Lukas,
Thanks a lot for this patch.
But don't you break NowPlaying with this? Or cases where the codec has
different metadata from the demux?
Best,
On Wed, 22 Mar 2017, at 00:38, Lukas Solanka wrote:
> Fixes the track title issue described in #4143, but does not deal with
> track duration.
>
> On 21 March 2017 at 23:21, Lukas Solanka <lsolanka at gmail.com> wrote:
>> 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] );
>> dst->ppsz_meta[i] = strdup( src->ppsz_meta[i] );
>> --
>> 2.5.0
> _________________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
Jean-Baptiste Kempf - President
+33 672 704 734
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170322/222ff3e9/attachment.html>
More information about the vlc-devel
mailing list