summaryrefslogtreecommitdiffstats
path: root/src/file_mp3.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2015-09-03 08:04:04 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2015-09-03 08:04:04 +0200
commit00557961744f0a88000678db179a84a4a0e4fdfd (patch)
treedb0bae677a788104fa71edaebcbfa30402833179 /src/file_mp3.c
parentac980c4a61e0158ce5ceec8555a89b38eac5066c (diff)
PhotoRec: reduce the number of backward search
Diffstat (limited to 'src/file_mp3.c')
-rw-r--r--src/file_mp3.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/file_mp3.c b/src/file_mp3.c
index e5e793a..b2414fc 100644
--- a/src/file_mp3.c
+++ b/src/file_mp3.c
@@ -167,11 +167,17 @@ static int header_check_mp3(const unsigned char *buffer, const unsigned int buff
{
if(file_recovery->file_stat->file_hint==&file_hint_mp3 ||
file_recovery->file_stat->file_hint==&file_hint_mkv)
+ {
+ header_ignored(file_recovery_new);
return 0;
+ }
/* RGV values from TIFF may be similar to the beginning of an mp3 */
if(file_recovery->file_stat->file_hint==&file_hint_tiff &&
buffer[0]==buffer[3] && buffer[1]==buffer[4] && buffer[2]==buffer[5])
+ {
+ header_ignored(file_recovery_new);
return 0;
+ }
}
while(potential_frame_offset+1 < buffer_size &&
potential_frame_offset+1 < 2048)