summaryrefslogtreecommitdiffstats
path: root/test/ipedec.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-04-17 09:06:34 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-04-17 09:06:34 +0200
commitdf2c62d675aff46d1188b7079e866276ec88aa2e (patch)
treeba6a9c1e116f5ccbc1e60033f73d14472ad2c85d /test/ipedec.c
parent64983dcc892b56c137b6ec32087fa835c637f25c (diff)
downloadufodecode-df2c62d675aff46d1188b7079e866276ec88aa2e.tar.gz
ufodecode-df2c62d675aff46d1188b7079e866276ec88aa2e.tar.bz2
ufodecode-df2c62d675aff46d1188b7079e866276ec88aa2e.tar.xz
ufodecode-df2c62d675aff46d1188b7079e866276ec88aa2e.zip
Decode frames after encountering corrupted ones
Diffstat (limited to 'test/ipedec.c')
-rw-r--r--test/ipedec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ipedec.c b/test/ipedec.c
index ad982ef..cbc5c25 100644
--- a/test/ipedec.c
+++ b/test/ipedec.c
@@ -56,7 +56,7 @@ static void process_file(const char *filename, int rows, int clear_frame)
int error = read_raw_file(filename, &buffer, &num_bytes);
if (error) {
- fprintf(stderr, "Error processing %s: %s\n", filename, strerror(error));
+ fprintf(stderr, "Error reading %s: %s\n", filename, strerror(error));
return;
}
@@ -76,7 +76,7 @@ static void process_file(const char *filename, int rows, int clear_frame)
return;
}
- while (!err) {
+ while (err != EIO) {
if (clear_frame)
memset(pixels, 0, 2048 * 1088 * sizeof(uint16_t));
@@ -90,6 +90,8 @@ static void process_file(const char *filename, int rows, int clear_frame)
useconds += end.tv_usec - start.tv_usec;
fwrite(pixels, sizeof(uint16_t), 2048 * 1088, fp);
}
+ else if (err != EIO)
+ fprintf(stderr, "Failed to decode frame %i\n", num_frames);
}
fclose(fp);