[vlc-devel] commit: Fixed a segfault after iso639_lang_t p_languages API breakage. ( Laurent Aimar )

git version control git at videolan.org
Tue Jul 14 01:34:48 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Jul 14 01:30:38 2009 +0200| [27d1c356e2acf97126e72d6a0e7fad6fa51f874a] | committer: Laurent Aimar 

Fixed a segfault after iso639_lang_t p_languages API breakage.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=27d1c356e2acf97126e72d6a0e7fad6fa51f874a
---

 src/input/es_out.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index f32148a..04e6ce4 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2578,7 +2578,7 @@ static char *LanguageGetCode( const char *psz_lang )
     if( psz_lang == NULL || *psz_lang == '\0' )
         return strdup("??");
 
-    for( pl = p_languages; pl->psz_iso639_1 != NULL; pl++ )
+    for( pl = p_languages; pl->psz_eng_name != NULL; pl++ )
     {
         if( !strcasecmp( pl->psz_eng_name, psz_lang ) ||
             !strcasecmp( pl->psz_native_name, psz_lang ) ||
@@ -2588,8 +2588,8 @@ static char *LanguageGetCode( const char *psz_lang )
             break;
     }
 
-    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("??");
 }




More information about the vlc-devel mailing list