summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/file_orf.c16
-rw-r--r--src/file_tiff.c1
2 files changed, 10 insertions, 7 deletions
diff --git a/src/file_orf.c b/src/file_orf.c
index 662b622..0806f07 100644
--- a/src/file_orf.c
+++ b/src/file_orf.c
@@ -29,7 +29,7 @@
#include <stdio.h>
#include "types.h"
#include "filegen.h"
-
+#include "file_tiff.h"
static void register_header_check_orf(file_stat_t *file_stat);
static int header_check_orf(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
@@ -44,27 +44,29 @@ const file_hint_t file_hint_orf= {
.register_header_check=&register_header_check_orf
};
-static const unsigned char orf_header[4]= { 0x49, 0x49, 0x52, 0x53};
-static const unsigned char orf_header2[4]= { 'I', 'I', 'R', 'O'};
+static const unsigned char orf_header_IIRS[4]= { 0x49, 0x49, 0x52, 0x53};
+static const unsigned char orf_header_IIRO[4]= { 'I', 'I', 'R', 'O'};
static void register_header_check_orf(file_stat_t *file_stat)
{
- register_header_check(0, orf_header, sizeof(orf_header), &header_check_orf, file_stat);
- register_header_check(0, orf_header2, sizeof(orf_header2), &header_check_orf, file_stat);
+ register_header_check(0, orf_header_IIRS, sizeof(orf_header_IIRS), &header_check_orf, file_stat);
+ register_header_check(0, orf_header_IIRO, sizeof(orf_header_IIRO), &header_check_orf, file_stat);
}
static int header_check_orf(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
{
- if(memcmp(buffer, orf_header, sizeof(orf_header))==0)
+ if(memcmp(buffer, orf_header_IIRS, sizeof(orf_header_IIRS))==0)
{
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_orf.extension;
return 1;
}
- if(memcmp(buffer, orf_header2, sizeof(orf_header2))==0)
+ if(memcmp(buffer, orf_header_IIRO, sizeof(orf_header_IIRO))==0)
{
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_orf.extension;
+ file_recovery_new->time=get_date_from_tiff_header((const TIFFHeader *)buffer, buffer_size);
+ file_recovery_new->file_check=&file_check_tiff;
return 1;
}
return 0;
diff --git a/src/file_tiff.c b/src/file_tiff.c
index a476a26..6b255c1 100644
--- a/src/file_tiff.c
+++ b/src/file_tiff.c
@@ -955,6 +955,7 @@ void file_check_tiff(file_recovery_t *fr)
else if(strcmp(fr->extension,"cr2")==0 ||
strcmp(fr->extension,"dcr")==0 ||
strcmp(fr->extension,"nef")==0 ||
+ strcmp(fr->extension,"orf")==0 ||
strcmp(fr->extension,"pef")==0 ||
strcmp(fr->extension,"sr2")==0 ||
(strcmp(fr->extension,"tif")==0 && calculated_file_size>1024*1024*1024) ||