[vlc-devel] [PATCH 1/2] m3u: assume m3u with BOM at start as utf-8 encoded.

Konstantin Pavlov thresh at videolan.org
Wed May 30 10:39:37 CEST 2012


X-Patched-By: Sergey Bolshakov <sbolshakov at altlinux.org>
---
 modules/demux/playlist/m3u.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/demux/playlist/m3u.c b/modules/demux/playlist/m3u.c
index 3fe869e..f3ba611 100644
--- a/modules/demux/playlist/m3u.c
+++ b/modules/demux/playlist/m3u.c
@@ -70,6 +70,7 @@ int Import_M3U( vlc_object_t *p_this )
     char *(*pf_dup) (const char *);
 
     if( POKE( p_peek, "RTSPtext", 8 ) /* QuickTime */
+     || POKE( p_peek, "\xef\xbb\xbf" "#EXTM3U", 10) /* BOM at start */
      || demux_IsPathExtension( p_demux, ".m3u8" )
      || demux_IsForced( p_demux, "m3u8" ) )
         pf_dup = CheckUnicode; /* UTF-8 */
-- 
1.7.9.7




More information about the vlc-devel mailing list