summaryrefslogtreecommitdiff
path: root/libfec
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2016-09-01 15:51:12 -0700
committerSami Tolvanen <samitolvanen@google.com>2016-09-01 15:51:12 -0700
commitd9fd5b0d7507877ad6a0ede10c473fe2970d278d (patch)
tree9518cabc76219bcf386afedeea0977b65d96bb87 /libfec
parent643af28f1d5800fe4097edd2c1853372f4a88b29 (diff)
downloadextras-d9fd5b0d7507877ad6a0ede10c473fe2970d278d.tar.gz
libfec: allow fec_header to be located anywhere
Don't require fec_header to be immediately after ECC data. Bug: 28865197 Change-Id: Ie8faeeb07c35e2593553f7678762aae7f14c2ff7
Diffstat (limited to 'libfec')
-rw-r--r--libfec/fec_open.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/libfec/fec_open.cpp b/libfec/fec_open.cpp
index 0e41bf4f..caec3704 100644
--- a/libfec/fec_open.cpp
+++ b/libfec/fec_open.cpp
@@ -145,13 +145,6 @@ static int parse_ecc_header(fec_handle *f, uint64_t offset)
error("inconsistent ecc size %u", header.fec_size);
return -1;
}
- /* structure: data | ecc | header */
- if (offset < header.fec_size ||
- offset - header.fec_size != header.inp_size) {
- error("unexpected input size: %" PRIu64 " vs %" PRIu64, offset,
- header.inp_size);
- return -1;
- }
f->data_size = header.inp_size;
f->ecc.blocks = fec_div_round_up(f->data_size, FEC_BLOCKSIZE);