The byte sequence 0xff, 0xff, 0xff 0xff is not a real marker to skip, instead
it is one byte from the image and the following three 0xff bytes might belong
to a real marker. Modify pixart_fill_nbits() macro to pass the first 0xff byte
as an image data.
Priority: normal
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
libv4l-0.6.5
------------
* Add more laptop models to the upside down devices table
+* Small fix to pixart jpeg decoding, this fixes the occasional corrupt
+ frame we used to get (Németh Márton)
libv4l-0.6.4
------------
} \
break; \
case 0xff: \
- if (stream[1] == 0xff && (stream[2] < 7 || stream[2] == 0xff)) { \
- stream += 3; \
- c = *stream++; \
- break; \
+ if (stream[1] == 0xff) { \
+ if (stream[2] < 7) { \
+ stream += 3; \
+ c = *stream++; \
+ break; \
+ } else if (stream[2] == 0xff) { \
+ /* four 0xff in a row: the first belongs to the image data */ \
+ break; \
+ }\
} \
/* Error fall through */ \
default: \