2 ** Copyright (C) 2010-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
4 ** This program is free software; you can redistribute it and/or modify
5 ** it under the terms of the GNU Lesser General Public License as published by
6 ** the Free Software Foundation; either version 2.1 of the License, or
7 ** (at your option) any later version.
9 ** This program is distributed in the hope that it will be useful,
10 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ** GNU Lesser General Public License for more details.
14 ** You should have received a copy of the GNU Lesser General Public License
15 ** along with this program; if not, write to the Free Software
16 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 id3_skip (SF_PRIVATE
* psf
)
32 { unsigned char buf
[10] ;
34 memset (buf
, 0, sizeof (buf
)) ;
35 psf_binheader_readf (psf
, "pb", 0, buf
, 10) ;
37 if (buf
[0] == 'I' && buf
[1] == 'D' && buf
[2] == '3')
38 { int offset
= buf
[6] & 0x7f ;
39 offset
= (offset
<< 7) | (buf
[7] & 0x7f) ;
40 offset
= (offset
<< 7) | (buf
[8] & 0x7f) ;
41 offset
= (offset
<< 7) | (buf
[9] & 0x7f) ;
43 psf_binheader_readf (psf
, "j", make_size_t (offset
)) ;
45 psf_log_printf (psf
, "ID3 length : %d\n--------------------\n", offset
) ;
47 psf
->fileoffset
= 10 + offset
;