summaryrefslogtreecommitdiff
path: root/src/demuxers/id3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/demuxers/id3.c')
-rw-r--r--src/demuxers/id3.c40
1 files changed, 4 insertions, 36 deletions
diff --git a/src/demuxers/id3.c b/src/demuxers/id3.c
index b707166b6..a59eb6259 100644
--- a/src/demuxers/id3.c
+++ b/src/demuxers/id3.c
@@ -227,38 +227,6 @@ static int id3v2_parse_genre(char* dest, char *src, int len) {
return 1;
}
-#if 0
-/* parse an unsynchronized 16bits integer */
-static uint16_t BE_16_synchsafe(uint8_t buf[2]) {
- return ((uint16_t)(buf[0] & 0x7F) << 7) |
- (uint16_t)(buf[1] & 0x7F);
-}
-#endif
-
-/* parse an unsynchronized 24bits integer */
-static uint32_t BE_24_synchsafe(uint8_t buf[3]) {
- return ((uint32_t)(buf[0] & 0x7F) << 14) |
- ((uint32_t)(buf[1] & 0x7F) << 7) |
- (uint32_t)(buf[2] & 0x7F);
-}
-
-/* parse an unsynchronized 32bits integer */
-static uint32_t BE_32_synchsafe(uint8_t buf[4]) {
- return ((uint32_t)(buf[0] & 0x7F) << 21) |
- ((uint32_t)(buf[1] & 0x7F) << 14) |
- ((uint32_t)(buf[2] & 0x7F) << 7) |
- (uint32_t)(buf[3] & 0x7F);
-}
-
-/* parse an unsynchronized 35bits integer */
-static uint32_t BE_35_synchsafe(uint8_t buf[5]) {
- return ((uint32_t)(buf[0] & 0x07) << 28) |
- ((uint32_t)(buf[1] & 0x7F) << 21) |
- ((uint32_t)(buf[2] & 0x7F) << 14) |
- ((uint32_t)(buf[3] & 0x7F) << 7) |
- (uint32_t)(buf[4] & 0x7F);
-}
-
static int id3v2_parse_header(input_plugin_t *input, uint8_t *mp3_frame_header,
id3v2_header_t *tag_header) {
uint8_t buf[6];
@@ -379,7 +347,7 @@ int id3v22_parse_tag(input_plugin_t *input,
if (tag_header.flags & ID3V22_ZERO_FLAG) {
/* invalid flags */
xprintf(stream->xine, XINE_VERBOSITY_DEBUG,
- "id3: invalid header flags\n");
+ "id3: invalid header flags (%02x)\n", tag_header.flags);
input->seek (input, tag_header.size - pos, SEEK_CUR);
return 0;
}
@@ -573,7 +541,7 @@ int id3v23_parse_tag(input_plugin_t *input,
if (tag_header.flags & ID3V23_ZERO_FLAG) {
/* invalid flags */
xprintf(stream->xine, XINE_VERBOSITY_DEBUG,
- "id3: invalid header flags\n");
+ "id3: invalid header flags (%02x)\n", tag_header.flags);
input->seek (input, tag_header.size - pos, SEEK_CUR);
return 0;
}
@@ -824,7 +792,7 @@ int id3v24_parse_tag(input_plugin_t *input,
if (tag_header.flags & ID3V24_ZERO_FLAG) {
/* invalid flags */
xprintf(stream->xine, XINE_VERBOSITY_DEBUG,
- "id3: invalid header flags\n");
+ "id3: invalid header flags (%02x)\n", tag_header.flags);
input->seek (input, tag_header.size - pos, SEEK_CUR);
return 0;
}
@@ -898,7 +866,7 @@ int id3v2_parse_tag(input_plugin_t *input,
break;
case 4:
- xprintf(stream->xine, XINE_VERBOSITY_LOG, "ID3V2.3 tag\n");
+ xprintf(stream->xine, XINE_VERBOSITY_LOG, "ID3V2.4 tag\n");
result = id3v24_parse_tag(input, stream, mp3_frame_header);
break;