From 4d4bf291725cf7874b0e7a9d16e2900b610014ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 13 Dec 2007 15:21:23 +0100 Subject: Use ID3V2X_TAG and _MASK to identify ID3 signature. --HG-- extra : transplant_source : %88B%C1%C9%26%D9%8E%90%D6jW%E3%B0%F7%04%8E%AE%06h%9A --- src/demuxers/id3.c | 2 +- src/demuxers/id3.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/demuxers/id3.c b/src/demuxers/id3.c index 8f6878656..0ec1cdaa5 100644 --- a/src/demuxers/id3.c +++ b/src/demuxers/id3.c @@ -852,7 +852,7 @@ int id3v24_parse_tag(input_plugin_t *input, int id3v2_parse_tag(input_plugin_t *input, xine_stream_t *stream, uint32_t id3_signature) { - _x_assert(mp3_frame_header[0] == 'I' && mp3_frame_header[1] == 'D' && mp3_frame_header[2] == '3'); + _x_assert((id3_signature & ID3V2X_MASK) == ID3V2X_TAG); int result = 0; diff --git a/src/demuxers/id3.h b/src/demuxers/id3.h index 711087a95..897bb6cd0 100644 --- a/src/demuxers/id3.h +++ b/src/demuxers/id3.h @@ -174,10 +174,7 @@ int id3v2_parse_tag(input_plugin_t *input, * @param ptr Pointer to the first 10 bytes of the ID3 tag */ static inline int id3v2_istag(uint32_t id3_signature) { - return - (ptr[0] == 'I') && - (ptr[1] == 'D') && - (ptr[2] == '3'); + return (id3_signature & ID3V2X_MASK) == ID3V2X_TAG; } #if 0 -- cgit v1.2.3