[vlc-devel] Patches for 0.9.2

Marian Ďurkovič md at bts.sk
Fri Sep 12 07:52:05 CEST 2008


Hi,

  could someone please commit the following two patches before 0.9.2 is
released? The first one resolves problem with some DVB-S channels
transmitting language codes in uppercase. The second avoids hanging VLC
when user tries to seek.

    Thanks & kind regards,

        M.

#1:   Ignore case when comparing ISO-639 language codes
-------------------------------------------------------
diff --git a/src/text/iso_lang.c b/src/text/iso_lang.c
index eaae385..3a28cd9 100644
--- a/src/text/iso_lang.c
+++ b/src/text/iso_lang.c
@@ -49,7 +49,7 @@ const iso639_lang_t * GetLang_1( const char * psz_code )
     const iso639_lang_t *p_lang;

     for( p_lang = p_languages; p_lang->psz_eng_name; p_lang++ )
-        if( !strncmp( p_lang->psz_iso639_1, psz_code, 2 ) )
+        if( !strncasecmp( p_lang->psz_iso639_1, psz_code, 2 ) )
             return p_lang;

     return &unknown_language;
@@ -60,7 +60,7 @@ const iso639_lang_t * GetLang_2T( const char * psz_code )
     const iso639_lang_t *p_lang;

     for( p_lang = p_languages; p_lang->psz_eng_name; p_lang++ )
-        if( !strncmp( p_lang->psz_iso639_2T, psz_code, 3 ) )
+        if( !strncasecmp( p_lang->psz_iso639_2T, psz_code, 3 ) )
             return p_lang;

     return &unknown_language;
@@ -71,7 +71,7 @@ const iso639_lang_t * GetLang_2B( const char * psz_code )
     const iso639_lang_t *p_lang;

     for( p_lang = p_languages; p_lang->psz_eng_name; p_lang++ )
-        if( !strncmp( p_lang->psz_iso639_2B, psz_code, 3 ) )
+        if( !strncasecmp( p_lang->psz_iso639_2B, psz_code, 3 ) )
             return p_lang;

     return &unknown_language; 



#2 Don't hang VLC on ABOR in FTP access (closes #2027)
------------------------------------------------------
diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index 75878f4..79cf667 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -791,16 +791,13 @@ static int ftp_StopStream ( vlc_object_t *p_access,
access

     if( p_sys->fd_data != -1 )
     {
-        int i_answer;
-        ftp_ReadCommand( p_access, p_sys, &i_answer, NULL );
-        if ( i_answer != 227 )
-            /* If answer is from the previous command,
-             * rathen that succesful ABOR - read next command */
-            ftp_ReadCommand( p_access, p_sys, NULL, NULL );
-
         net_Close( p_sys->fd_data );
         p_sys->fd_data = -1;
+        /* Read the final response from RETR/STOR, i.e. 426 or 226 */
+        ftp_ReadCommand( p_access, p_sys, NULL, NULL );
     }
+    /* Read the response from ABOR, i.e. 226 or 225 */
+    ftp_ReadCommand( p_access, p_sys, NULL, NULL );

     return VLC_SUCCESS;
 }






More information about the vlc-devel mailing list