ref: c39ecb52df1ca8981880a0b82bfd471805983739
parent: 815ac8d6497873fdad42032e433b832c80d5baaf
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Mon Feb 19 13:00:22 EST 2024
wav: process unknown tags as well
--- a/wav.c
+++ b/wav.c
@@ -12,6 +12,7 @@
{"INAM", Ttitle},
{"IPRD", Talbum},
{"ITRK", Ttrack},
+ {"????", Tunknown},
};
int
@@ -68,11 +69,12 @@
continue;
}else if(info){
for(n = 0; n < nelem(t); n++){
- if(memcmp(d, t[n].s, 4) == 0){
- if(ctx->read(ctx, d, csz) != (int)csz)
+ if(memcmp(d, t[n].s, 4) == 0 || t[n].type == Tunknown){
+ if(ctx->read(ctx, d+5, csz) != (int)csz)
return -1;
- d[csz-1] = 0;
- txtcb(ctx, t[n].type, "", d);
+ d[4] = 0;
+ d[5+csz-1] = 0;
+ txtcb(ctx, t[n].type, t[n].type == Tunknown ? (char*)d : "", d+5);
csz = 0;
break;
}