[vlc-commits] m3u: assume m3u with BOM at start as utf-8 encoded.

Konstantin Pavlov git at videolan.org
Thu May 31 13:44:41 CEST 2012


vlc | branch: master | Konstantin Pavlov <thresh at videolan.org> | Tue May 29 10:49:32 2012 +0400| [75a167f5b377a1edba3e1bf0230af05da7974347] | committer: Konstantin Pavlov

m3u: assume m3u with BOM at start as utf-8 encoded.

X-Patched-By: Sergey Bolshakov <sbolshakov at altlinux.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=75a167f5b377a1edba3e1bf0230af05da7974347
---

 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 */



More information about the vlc-commits mailing list