diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/mp3data.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/firmware/mp3data.c b/firmware/mp3data.c index 5dbf49a6da..7c8c75833b 100644 --- a/firmware/mp3data.c +++ b/firmware/mp3data.c | |||
@@ -398,10 +398,7 @@ int get_mp3file_info(int fd, struct mp3info *info) | |||
398 | vbrheader = frame + 17; | 398 | vbrheader = frame + 17; |
399 | } | 399 | } |
400 | 400 | ||
401 | if (vbrheader[0] == 'X' && | 401 | if (!memcmp(vbrheader, "Xing", 4)) |
402 | vbrheader[1] == 'i' && | ||
403 | vbrheader[2] == 'n' && | ||
404 | vbrheader[3] == 'g') | ||
405 | { | 402 | { |
406 | int i = 8; /* Where to start parsing info */ | 403 | int i = 8; /* Where to start parsing info */ |
407 | 404 | ||
@@ -452,10 +449,7 @@ int get_mp3file_info(int fd, struct mp3info *info) | |||
452 | } | 449 | } |
453 | } | 450 | } |
454 | 451 | ||
455 | if (vbrheader[0] == 'V' && | 452 | if (!memcmp(vbrheader, "VBRI", 4)) |
456 | vbrheader[1] == 'B' && | ||
457 | vbrheader[2] == 'R' && | ||
458 | vbrheader[3] == 'I') | ||
459 | { | 453 | { |
460 | DEBUGF("VBRI header\n"); | 454 | DEBUGF("VBRI header\n"); |
461 | 455 | ||
@@ -517,10 +511,7 @@ int get_mp3file_info(int fd, struct mp3info *info) | |||
517 | } | 511 | } |
518 | 512 | ||
519 | /* Is it a LAME Info frame? */ | 513 | /* Is it a LAME Info frame? */ |
520 | if (vbrheader[0] == 'I' && | 514 | if (!memcmp(vbrheader, "Info", 4)) |
521 | vbrheader[1] == 'n' && | ||
522 | vbrheader[2] == 'f' && | ||
523 | vbrheader[3] == 'o') | ||
524 | { | 515 | { |
525 | /* Make sure we skip this frame in playback */ | 516 | /* Make sure we skip this frame in playback */ |
526 | bytecount += info->frame_size; | 517 | bytecount += info->frame_size; |