zapping-vbi / zvbi

Vertical Blanking Interval (VBI) utilities
Other
6 stars 5 forks source link

idl_a_demux_feed not removing dummy bytes correctly #51

Closed ZXGuesser closed 2 days ago

ZXGuesser commented 6 months ago

This code appears to be simply counting the total number of 0x00 and 0xFF bytes within an IDL A payload, and skipping a byte when either count reaches 8, rather than counting only consecutive 0x00 or 0xFF bytes.

Additionally it appears to be skipping the 8th 0x00 or 0xFF byte rather than skipping the following byte which I understand to be the position of the dummy byte.

ZXGuesser commented 5 months ago

I believe the attached patch corrects the behaviour of dummy byte removal, however I now have questions about other parts of this code.

The flags variable doesn't appear to be used, with the VBI_IDL_DEPENDENT flag never getting set in dx->flags. In addition dx->flags doesn't appear to be being initialised anywhere, so holds spurious values.

ileanadumitrescu95 commented 2 days ago

Thank you for your bug report and patch. The attached patch has been merged.