]> git.sesse.net Git - vlc/commitdiff
EPG: Catch a replace EIT-coded CR/LFs
authorMarian Ďurkovič <md@bts.sk>
Mon, 14 Sep 2009 10:04:27 +0000 (12:04 +0200)
committerMarian Ďurkovič <md@bts.sk>
Mon, 14 Sep 2009 10:04:27 +0000 (12:04 +0200)
modules/demux/ts.c

index 6704d4e25a3a91466497078f56cbe6eae950cf98..ade236734a479fa7eae970b02b8affb6b78dcbaf 100644 (file)
@@ -2705,6 +2705,18 @@ static char *EITConvertToUTF8( const unsigned char *psz_instring,
         vlc_iconv_close( iconv_handle );
 
         *psz_out = '\0';
+
+        /* Replace EIT-coded CR/LFs by spaces */
+        unsigned char *pbuf = (unsigned char *)psz_outstring;
+        for( ; pbuf < (unsigned char *)psz_out ; pbuf++)
+        {
+            if( pbuf[0] == 0xc2 && pbuf[1] == 0x8a )
+            {
+                pbuf[0] = pbuf[1] = ' ';
+            }
+        }
+
+
     }
     return psz_outstring;
 }