Commit 67bd0e7d authored by Francois Cartegnie's avatar Francois Cartegnie

demux: ogg: map language to fmt desc

refs #4175
parent d1b35f9e
......@@ -243,6 +243,14 @@ void vorbis_ParseComment( es_format_t *p_fmt, vlc_meta_t **pp_meta,
has##var = true; \
}
#define IF_EXTRACT_FMT(txt,var,fmt,target) \
IF_EXTRACT(txt,var)\
if( fmt && !strncasecmp(psz_comment, txt, strlen(txt)) )\
{\
if ( fmt->target ) free( fmt->target );\
fmt->target = strdup(&psz_comment[strlen(txt)]);\
}
IF_EXTRACT("TITLE=", Title )
else IF_EXTRACT("ARTIST=", Artist )
else IF_EXTRACT("GENRE=", Genre )
......@@ -276,7 +284,7 @@ void vorbis_ParseComment( es_format_t *p_fmt, vlc_meta_t **pp_meta,
else IF_EXTRACT("COMMENTS=", Description )
else IF_EXTRACT("RATING=", Rating )
else IF_EXTRACT("DATE=", Date )
else IF_EXTRACT("LANGUAGE=", Language )
else IF_EXTRACT_FMT("LANGUAGE=", Language, p_fmt, psz_language )
else IF_EXTRACT("ORGANIZATION=", Publisher )
else IF_EXTRACT("ENCODER=", EncodedBy )
else if( !strncasecmp( psz_comment, "METADATA_BLOCK_PICTURE=", strlen("METADATA_BLOCK_PICTURE=")))
......
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