Skip to content
This repository has been archived by the owner on Nov 21, 2020. It is now read-only.

Commit

Permalink
Fix MPEG-2 detection and its crc16 bit
Browse files Browse the repository at this point in the history
  • Loading branch information
dd86k committed Jun 2, 2019
1 parent c729434 commit 73a7b01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/audio/mp3.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void scan_mp3(uint32_t sig, int id3) {

struct mp3_hdr h = *(struct mp3_hdr*)&sig;

char v = h.sig & 0x80 ? '1' : '2'; /// MPEG version
char v = h.sig & 0x800 ? '1' : '2'; /// MPEG version
char *l; // layer
char *b; // bitrate
char *f; // frequency
Expand Down Expand Up @@ -85,7 +85,7 @@ void scan_mp3(uint32_t sig, int id3) {
}
if (id3)
printf(", id3");
if (h.sig & 1)
if (h.sig & 0x100)
printf(", crc16");
if (h.info & 1)
printf(", priv. bit");
Expand Down
2 changes: 1 addition & 1 deletion src/ff.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ WAD: { // Fixes "expression expected" on clang-alpine
case 0xff743064: // '\377t0c'
scan_idx();
return;

case 0x587A37FD:
report("XZ archive");
return;
Expand Down

0 comments on commit 73a7b01

Please # to comment.