Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: EOVERFLOW with section filter



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 listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index