Commit 9c38070a authored by Filip Roséen's avatar Filip Roséen Committed by Jean-Baptiste Kempf

Xiph metadata: fix bug causing redudant "extra" metadata

The IF_EXTRACT_FMT macro is to be used in a if-else-tree, the usage of
IF_EXTRACT prior to the following if-statement did however cause the
single if-else-tree to be split up into two (causing the fallback-else
at the end to be unconditionally hit, even if another branch had already
handled the data).

If "TITLE=" metadata was found, we would still end up inside the
fallback since the previous implementation of IF_EXTRACT_FMT would start
a new if-else-tree.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <>
parent 3189e48d
......@@ -389,12 +389,15 @@ void vorbis_ParseComment( es_format_t *p_fmt, vlc_meta_t **pp_meta,
#define IF_EXTRACT_FMT(txt,var,fmt,target) \
if( fmt && !strncasecmp(psz_comment, txt, strlen(txt)) )\
if( !strncasecmp(psz_comment, txt, strlen(txt)) ) \
{ \
if( fmt )\
if ( fmt->target ) free( fmt->target );\
free( fmt->target );\
fmt->target = strdup(&psz_comment[strlen(txt)]);\
else IF_EXTRACT("ARTIST=", Artist )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment