diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-13 16:17:36 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-13 16:17:36 +0100 |
commit | f3ecab3ac824a02546809b5f19de247a549b9068 (patch) | |
tree | ea7677695bffcf58040c54296408bdd4b63c276d /src | |
parent | a67da65ffd7d96748aa1605c3a03601df5ec8c55 (diff) | |
download | xine-lib-f3ecab3ac824a02546809b5f19de247a549b9068.tar.gz xine-lib-f3ecab3ac824a02546809b5f19de247a549b9068.tar.bz2 |
Update the FLAC demuxer to use the new id3 interface. Check the fLaC signature through ME_FOURCC comparison.
--HG--
extra : transplant_source : %8D%C9%D9%96%BC%B4%B0%B1%C0%9F%1D%01%F8%8A%5DX%F8%D5k%86
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_flac.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/demuxers/demux_flac.c b/src/demuxers/demux_flac.c index a7a7c5009..0380de846 100644 --- a/src/demuxers/demux_flac.c +++ b/src/demuxers/demux_flac.c @@ -80,6 +80,7 @@ typedef struct { * It returns 1 if flac file was opened successfully. */ static int open_flac_file(demux_flac_t *flac) { + uint32_t signature; unsigned char preamble[10]; unsigned int block_length; unsigned char buffer[FLAC_SEEKPOINT_SIZE]; @@ -90,7 +91,7 @@ static int open_flac_file(demux_flac_t *flac) { /* fetch the file signature, 4 bytes will read both the fLaC * signature and the */ - if (_x_demux_read_header(flac->input, preamble, 4) != 4) + if (_x_demux_read_header(flac->input, &signature, 4) != 4) return 0; flac->input->seek(flac->input, 4, SEEK_SET); @@ -100,16 +101,15 @@ static int open_flac_file(demux_flac_t *flac) { * users use them and want them working, so check and skip the ID3 * tag if present. */ - if ( id3v2_istag(preamble) ) { - id3v2_parse_tag(flac->input, flac->stream, preamble); + if ( id3v2_istag(signature) ) { + id3v2_parse_tag(flac->input, flac->stream, signature); - if ( flac->input->read(flac->input, preamble, 4) != 4 ) + if ( flac->input->read(flac->input, &signature, 4) != 4 ) return 0; } /* validate signature */ - if ((preamble[0] != 'f') || (preamble[1] != 'L') || - (preamble[2] != 'a') || (preamble[3] != 'C')) + if ( signature != ME_FOURCC('f', 'L', 'a', 'C') ) return 0; /* loop through the metadata blocks; use a do-while construct since there |