int compute_afhi(const char *path, char *data, size_t size,
struct afh_info *afhi)
{
- int ret, i, format = guess_audio_format(path);
+ int ret, i, format;
+
+ afhi->header_offset = 0;
+ afhi->header_len = 0;
+ format = guess_audio_format(path);
if (format >= 0) {
ret = afl[format].get_file_info(data, size, afhi);