summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-13 15:21:23 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-13 15:21:23 +0100
commit4d4bf291725cf7874b0e7a9d16e2900b610014ce (patch)
tree9dfebd97e7efc781b61cb3576ce17468b0ebff00
parent03610b7bcb6864e68309700703312cb46b67b7af (diff)
downloadxine-lib-4d4bf291725cf7874b0e7a9d16e2900b610014ce.tar.gz
xine-lib-4d4bf291725cf7874b0e7a9d16e2900b610014ce.tar.bz2
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
-rw-r--r--src/demuxers/id3.c2
-rw-r--r--src/demuxers/id3.h5
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