diff options
Diffstat (limited to 'lib/rbcodec/metadata/mp3data.c')
-rw-r--r-- | lib/rbcodec/metadata/mp3data.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/rbcodec/metadata/mp3data.c b/lib/rbcodec/metadata/mp3data.c index 49f9786c29..83605126d6 100644 --- a/lib/rbcodec/metadata/mp3data.c +++ b/lib/rbcodec/metadata/mp3data.c | |||
@@ -115,11 +115,6 @@ static bool is_mp3frameheader(unsigned long head) | |||
115 | return false; | 115 | return false; |
116 | if (!(head & LAYER_MASK)) /* no layer? */ | 116 | if (!(head & LAYER_MASK)) /* no layer? */ |
117 | return false; | 117 | return false; |
118 | #if CONFIG_CODEC != SWCODEC | ||
119 | /* The MAS can't decode layer 1, so treat layer 1 data as invalid */ | ||
120 | if ((head & LAYER_MASK) == LAYER_MASK) | ||
121 | return false; | ||
122 | #endif | ||
123 | if ((head & BITRATE_MASK) == BITRATE_MASK) /* bad bitrate? */ | 118 | if ((head & BITRATE_MASK) == BITRATE_MASK) /* bad bitrate? */ |
124 | return false; | 119 | return false; |
125 | if (!(head & BITRATE_MASK)) /* no bitrate? */ | 120 | if (!(head & BITRATE_MASK)) /* no bitrate? */ |
@@ -454,7 +449,6 @@ static void get_xing_info(struct mp3info *info, unsigned char *buf) | |||
454 | /* We don't care about this, but need to skip it */ | 449 | /* We don't care about this, but need to skip it */ |
455 | i += 4; | 450 | i += 4; |
456 | } | 451 | } |
457 | #if CONFIG_CODEC==SWCODEC | ||
458 | i += 21; | 452 | i += 21; |
459 | info->enc_delay = ((int)buf[i ] << 4) | (buf[i+1] >> 4); | 453 | info->enc_delay = ((int)buf[i ] << 4) | (buf[i+1] >> 4); |
460 | info->enc_padding = ((int)(buf[i+1]&0xF) << 8) | buf[i+2]; | 454 | info->enc_padding = ((int)(buf[i+1]&0xF) << 8) | buf[i+2]; |
@@ -467,7 +461,6 @@ static void get_xing_info(struct mp3info *info, unsigned char *buf) | |||
467 | info->enc_delay = -1; | 461 | info->enc_delay = -1; |
468 | info->enc_padding = -1; | 462 | info->enc_padding = -1; |
469 | } | 463 | } |
470 | #endif | ||
471 | } | 464 | } |
472 | 465 | ||
473 | /* Extract information from a 'VBRI' header. */ | 466 | /* Extract information from a 'VBRI' header. */ |
@@ -541,18 +534,16 @@ int get_mp3file_info(int fd, struct mp3info *info) | |||
541 | /* Initialize info and frame */ | 534 | /* Initialize info and frame */ |
542 | memset(info, 0, sizeof(struct mp3info)); | 535 | memset(info, 0, sizeof(struct mp3info)); |
543 | memset(frame, 0, sizeof(frame)); | 536 | memset(frame, 0, sizeof(frame)); |
544 | 537 | ||
545 | #if CONFIG_CODEC==SWCODEC | ||
546 | /* These two are needed for proper LAME gapless MP3 playback */ | 538 | /* These two are needed for proper LAME gapless MP3 playback */ |
547 | info->enc_delay = -1; | 539 | info->enc_delay = -1; |
548 | info->enc_padding = -1; | 540 | info->enc_padding = -1; |
549 | #endif | ||
550 | 541 | ||
551 | /* Get the very first single MPEG frame. */ | 542 | /* Get the very first single MPEG frame. */ |
552 | result = get_next_header_info(fd, &bytecount, info, true); | 543 | result = get_next_header_info(fd, &bytecount, info, true); |
553 | if(result) | 544 | if(result) |
554 | return result; | 545 | return result; |
555 | 546 | ||
556 | /* Read the amount of frame data to the buffer that is required for the | 547 | /* Read the amount of frame data to the buffer that is required for the |
557 | * vbr tag parsing. Skip the rest. */ | 548 | * vbr tag parsing. Skip the rest. */ |
558 | buf_size = MIN(info->frame_size-4, (int)sizeof(frame)); | 549 | buf_size = MIN(info->frame_size-4, (int)sizeof(frame)); |