zapping-vbi / zvbi

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

idl_a_demux_feed not removing dummy bytes correctly #51

Open ZXGuesser opened 3 months ago

ZXGuesser commented 3 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 3 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.