From 99730a4ce8e554147c01fc976e5c862ce01ee1e0 Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 5 Aug 2012 12:04:48 +0200 Subject: skip utf8 bom in cuesheets --- playlist.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'playlist.c') diff --git a/playlist.c b/playlist.c index 9244b205..5b240e80 100644 --- a/playlist.c +++ b/playlist.c @@ -998,6 +998,10 @@ plt_process_cue_track (playlist_t *playlist, const char *fname, playItem_t **pre playItem_t * plt_insert_cue_from_buffer (playlist_t *playlist, playItem_t *after, playItem_t *origin, const uint8_t *buffer, int buffersize, int numsamples, int samplerate) { LOCK; + if (buffersize >= 3 && buffer[0] == 0xef && buffer[1] == 0xbb && buffer[2] == 0xbf) { + buffer += 3; + buffersize -= 3; + } playItem_t *ins = after; trace ("plt_insert_cue_from_buffer numsamples=%d, samplerate=%d\n", numsamples, samplerate); char albumperformer[256] = ""; -- cgit v1.2.3