Commit aef00257 authored by Laurent Aimar's avatar Laurent Aimar

Fixed audio/spu language selection when none specified in dvdnav.

parent 1ada19aa
......@@ -859,12 +859,18 @@ static char *DemuxGetLanguageCode( demux_t *p_demux, const char *psz_var )
char *p;
psz_lang = var_CreateGetString( p_demux, psz_var );
if( !psz_lang )
return strdup(LANGUAGE_DEFAULT);
/* XXX: we will use only the first value
* (and ignore other ones in case of a list) */
if( ( p = strchr( psz_lang, ',' ) ) ) *p = '\0';
if( ( p = strchr( psz_lang, ',' ) ) )
*p = '\0';
for( pl = p_languages; pl->psz_iso639_1 != NULL; pl++ )
{
if( *psz_lang == '\0' )
continue;
if( !strcasecmp( pl->psz_eng_name, psz_lang ) ||
!strcasecmp( pl->psz_native_name, psz_lang ) ||
!strcasecmp( pl->psz_iso639_1, psz_lang ) ||
......
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