]> git.sesse.net Git - vlc/commitdiff
m3u: assume m3u with BOM at start as utf-8 encoded.
authorKonstantin Pavlov <thresh@videolan.org>
Tue, 29 May 2012 06:49:32 +0000 (10:49 +0400)
committerKonstantin Pavlov <thresh@videolan.org>
Thu, 31 May 2012 11:42:58 +0000 (15:42 +0400)
X-Patched-By: Sergey Bolshakov <sbolshakov@altlinux.org>
modules/demux/playlist/m3u.c

index 3fe869e9101b018a052b6b64e42565c86af5be86..f3ba6114ba74560c8d6f780c6b1d40ff23584c4c 100644 (file)
@@ -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 */