]> git.sesse.net Git - vlc/commitdiff
Fixed a segfault after iso639_lang_t p_languages API breakage.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 13 Jul 2009 23:31:21 +0000 (01:31 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 13 Jul 2009 23:31:21 +0000 (01:31 +0200)
modules/access/dvdnav.c

index ed1da38b4785a3ca56d876fdd7b3298f0dda5d20..8aa8353747627091aaf94e5abf4029507d0ca5b0 100644 (file)
@@ -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);
 }