summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2006-09-10 10:59:51 +0000
committerMagnus Holmgren <magnushol@gmail.com>2006-09-10 10:59:51 +0000
commite605786b2a737246e5813b5af1a910a0797f36de (patch)
treecfa8eccbf265e617d89a07c48f2d41f4db34f38a /apps/playlist.c
parenta4858cfa1c0f3c271ebc301b75769fdac74d3a20 (diff)
downloadrockbox-e605786b2a737246e5813b5af1a910a0797f36de.tar.gz
rockbox-e605786b2a737246e5813b5af1a910a0797f36de.zip
Patch #5770 by Dominik Riebeling: Skip BOM in playlists. Add '.m3u8' as a supported playlist extension.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10917 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index aa84bb090f..2f0895a590 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -501,6 +501,14 @@ static int add_indices_to_playlist(struct playlist_info* playlist,
501 501
502 p = (unsigned char *)buffer; 502 p = (unsigned char *)buffer;
503 503
504 /* utf8 BOM at beginning of file? */
505 if(i == 0 && nread > 3
506 && *p == 0xef && *(p+1) == 0xbb && *(p+2) == 0xbf) {
507 nread -= 3;
508 p += 3;
509 i += 3;
510 }
511
504 for(count=0; count < nread; count++,p++) { 512 for(count=0; count < nread; count++,p++) {
505 513
506 /* Are we on a new line? */ 514 /* Are we on a new line? */