Commit f36e9bec authored by Laurent Aimar's avatar Laurent Aimar

Fixed a segfault after iso639_lang_t p_languages API breakage.

parent 27d1c356
......@@ -911,7 +911,7 @@ static char *DemuxGetLanguageCode( demux_t *p_demux, const char *psz_var )
if( ( p = strchr( psz_lang, ',' ) ) )
*p = '\0';
for( pl = p_languages; pl->psz_iso639_1 != NULL; pl++ )
for( pl = p_languages; pl->psz_eng_name != NULL; pl++ )
{
if( *psz_lang == '\0' )
continue;
......@@ -925,8 +925,8 @@ static char *DemuxGetLanguageCode( demux_t *p_demux, const char *psz_var )
free( psz_lang );
if( pl->psz_iso639_1 != NULL )
return strdup( pl->psz_iso639_1 );
if( pl->psz_eng_name != NULL )
return strdup( pl->psz_eng_name );
return strdup(LANGUAGE_DEFAULT);
}
......
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