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

Konstantin Pavlov git at videolan.org
Thu May 31 17:18:40 CEST 2012


vlc/vlc-2.0 | branch: master | Konstantin Pavlov <thresh at videolan.org> | Tue May 29 10:49:32 2012 +0400| [343aa93de8c7ff721fe180383a56d1c703813434] | committer: Jean-Baptiste Kempf

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

X-Patched-By: Sergey Bolshakov <sbolshakov at altlinux.org>
(cherry picked from commit 75a167f5b377a1edba3e1bf0230af05da7974347)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=343aa93de8c7ff721fe180383a56d1c703813434
---

 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 bb6a88c..fa3640e 100644
--- a/modules/demux/playlist/m3u.c
+++ b/modules/demux/playlist/m3u.c
@@ -71,6 +71,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