header_check_ape: remove dead code

This commit is contained in:
Christophe Grenier 2014-11-15 12:20:18 +01:00
parent 134ce684e2
commit 17040353bc

View file

@ -122,20 +122,16 @@ static int header_check_ape(const unsigned char *buffer, const unsigned int buff
file_recovery_new->extension=file_hint_ape.extension; file_recovery_new->extension=file_hint_ape.extension;
return 1; return 1;
} }
else if(le16(ape->nChannels)<1 || le16(ape->nChannels)>2)
{ return 0;
if(le16(ape->nChannels)<1 || le16(ape->nChannels)>2) if(le32(ape->nSampleRate)==0)
return 0; return 0;
if(le32(ape->nSampleRate)==0) if(le32(ape->nTotalFrames)==0)
return 0; return 0;
if(le32(ape->nTotalFrames)==0) reset_file_recovery(file_recovery_new);
return 0; file_recovery_new->extension=file_hint_ape.extension;
reset_file_recovery(file_recovery_new); /* 4 + le32(ape->nHeaderBytes) + le32(ape->nTerminatingDataBytes) ? */
file_recovery_new->extension=file_hint_ape.extension; return 1;
/* 4 + le32(ape->nHeaderBytes) + le32(ape->nTerminatingDataBytes) ? */
return 1;
}
return 0;
} }
static void register_header_check_ape(file_stat_t *file_stat) static void register_header_check_ape(file_stat_t *file_stat)