[vlc-devel] [PATCH 2/2] Change: Tab-Fix, Minor code fix

Maximilian Madlung maxi.madlung at gmx.de
Mon Jul 28 20:29:01 CEST 2014


---
 src/input/es_out.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index 53ae491..95da724 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2727,24 +2727,24 @@ static char *LanguageGetName( const char *psz_code )
         return strdup( "" );
     }
 
-    /* Check if the language code consists a - and only take the front
+    /* Check if the language code consists a "-[...]" and only take the front
        part as language */
     if( strstr( psz_code, "-" ) != NULL)
     {
-	char * psz_lang = strtok ( ( char * ) psz_code, "-");
+        char * psz_lang = strtok ( ( char * ) psz_code, "-");
 
-	if( strlen( psz_lang ) == 2 )
+        if( strlen( psz_lang ) == 2 )
         {
-	    pl = GetLang_1( psz_lang );
-	}
-	if( strlen( psz_lang ) == 3 )
+            pl = GetLang_1( psz_lang );
+        }
+        else if( strlen( psz_lang ) == 3 )
 	{
-	    pl = GetLang_2B( psz_lang );
-	    if( !strcmp( pl->psz_iso639_1, "??" ) )
+            pl = GetLang_2B( psz_lang );
+            if( !strcmp( pl->psz_iso639_1, "??" ) )
             {
                 pl = GetLang_2T( psz_lang );
             }
-	}
+        }
     }
     else
     {
-- 
1.7.9.5




More information about the vlc-devel mailing list