diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2015-02-10 14:44:00 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2015-02-10 14:44:00 +0100 |
commit | 5f348c5f740e28a56bf17dafdbe32de3febebde3 (patch) | |
tree | fed29c8148e0b378a85dcd2b2ddf1aeffff3b1e5 /src | |
parent | 02aca13f192f5b49ed4ccce28fcf62ea29b2e2fe (diff) | |
download | libufodecode-5f348c5f740e28a56bf17dafdbe32de3febebde3.tar.gz libufodecode-5f348c5f740e28a56bf17dafdbe32de3febebde3.tar.bz2 libufodecode-5f348c5f740e28a56bf17dafdbe32de3febebde3.tar.xz libufodecode-5f348c5f740e28a56bf17dafdbe32de3febebde3.zip |
Fix for new DMA filling
deadbeefs and other magic numbers can appear now ...
Diffstat (limited to 'src')
-rw-r--r-- | src/ufodecode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ufodecode.c b/src/ufodecode.c index 03c4404..9f5851a 100644 --- a/src/ufodecode.c +++ b/src/ufodecode.c @@ -716,10 +716,13 @@ int ufo_decoder_get_next_frame(UfoDecoder *decoder, pos += advance == 0 ? 1 : advance; /* if bytes left and we see fill bytes, skip them */ - if (((pos + 2) < num_words) && ((raw[pos] == 0x0) && (raw[pos+1] == 0x1111111))) { + if (((pos + 2) < num_words) && ((raw[pos] == 0x0) && ((raw[pos+1] == 0x1111111) || raw[pos+1] == 0x0))) { pos += 2; - while ((pos < num_words) && ((raw[pos] == 0x89abcdef) || (raw[pos] == 0x1234567))) + while ((pos < num_words) && + ((raw[pos] == 0x89abcdef) || (raw[pos] == 0x1234567) || + (raw[pos] == 0x0) || (raw[pos] == 0xdeadbeef) || (0x98badcfe))) /* new filling ... */ { pos++; + } } decoder->current_pos = pos; |