On Tue, 2003-01-14 at 08:30, Tomi Ollila wrote: > len = read(fd, buf, 4096) > > len returns 3072. > > The length encoded in buf (in byte offsets 0, 1, 2): 2048.
No. The section length is 3072 - 3 in this case. The driver does never return more than one section at once. > It is much easier to read first those 3 bytes, and then > length. Otherwise, depending how read() behaves in this > case, some more complex code needs to be developed to > handle data... In worst case scenario, read may return > anything between 1 and full requested amount of data > in each read() call. If you always read 4096 bytes then you will always receive whole sections. Regards, Andreas -- Info: To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as subject.
