summaryrefslogtreecommitdiffstats
path: root/src/file_oci.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-12-14 21:36:24 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2013-12-14 21:40:04 +0100
commit3213247d998d58627eb4029afce6be8680de3b30 (patch)
tree96d4a64aca2201410703b5c15589715fe1557aa1 /src/file_oci.c
parent5de0329f2184bdf89e087f414b651448df096c1f (diff)
PhotoRec: use an enum for values returned by data_check()
rename .m2ts and .ts using pid from header
Diffstat (limited to 'src/file_oci.c')
-rw-r--r--src/file_oci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/file_oci.c b/src/file_oci.c
index 8575648..5614983 100644
--- a/src/file_oci.c
+++ b/src/file_oci.c
@@ -46,7 +46,7 @@ static const unsigned char oci_header[8]= {
'O' , 'P' , 'I' , 'M' , '0' , 0x00, 0x00, 0x00
};
-static int data_check_oci(const unsigned char *buffer, const unsigned int buffer_size, file_recovery_t *file_recovery)
+static data_check_t data_check_oci(const unsigned char *buffer, const unsigned int buffer_size, file_recovery_t *file_recovery)
{
while(file_recovery->calculated_file_size + buffer_size/2 >= file_recovery->file_size &&
file_recovery->calculated_file_size + 8 < file_recovery->file_size + buffer_size/2)
@@ -70,14 +70,14 @@ static int data_check_oci(const unsigned char *buffer, const unsigned int buffer
}
else
{
- return 2;
+ return DC_STOP;
}
}
#ifdef DEBUG_MOV
log_trace("file_oci.c: new calculated_file_size %llu\n",
(long long unsigned)file_recovery->calculated_file_size);
#endif
- return 1;
+ return DC_CONTINUE;
}
static int header_check_oci(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)