file: detect webp files (thanks kemal)

this patch adds a small check to the "iff" function, so this
way file can detect webp files. tested with a webp file i
found randomly.
This commit is contained in:
cinap_lenrek 2021-04-03 19:32:47 +02:00
parent 958b476499
commit d41c867696

View file

@ -962,6 +962,8 @@ iff(void)
print("%s\n", mime? "audio/wave": "wave audio");
else if (strncmp((char*)buf+8, "AVI ", 4) == 0)
print("%s\n", mime? "video/avi": "avi video");
else if (strncmp((char*)buf+8, "WEBP", 4) == 0)
print("%s\n", mime? "image/webp": "webp image");
else
print("%s\n", mime? OCTET : "riff file");
return 1;