Mailing List archive

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

[linux-dvb] Re: Bug in software demux still in 2.6.10



On Fri January 7 2005 12:19 pm, Valsecchi Patrick wrote:
> Hi,
>
> I found another risk of feeding corruped sections to a unknowing
> userspace application. This time, it's not in the
> de-packetization anymore, but in the CRC checking.


I had posted another log on that some time back.. I thought nobody was 
interested...

-----------------------Old mail------------------------------
Re: [linux-dvb] Re: dvb-kernel TS continuity errors

From: 
Manu Abraham <manu@kromtek.com>  (Kromtek Systems)


To: 
linux-dvb@linuxtv.org


Date: 
27.09.2004 12:27 pm

On Mon September 27 2004 12:19 am, segarral@free.fr wrote:
> Hi,
>
> I have maybe this kind of problem with a WinTV Nova-S budget card:
>
> When I'm recording a TS, some payloads (188 bytes) are forgotten.
>
> A consequence is, for example, when I'm listenning to the 'Radio FG'
> with mpg123, I can read the error message:
>    Illegal Audio-MPEG-Header
>
> (RadioFG: 12207MHz-V-27500-3/4- APID: 243)


I get an error like this,  with around 12 streams. I have been doing some 
digging around, without much results lately

libdvbpsi error (PSI decoder): TS discontinuity (received 10, expected 9)
libdvbpsi error (misc PSI): Bad CRC_32 (0xcdf6ce8e) !!!
libdvbpsi error (PSI decoder): PSI section too long
libdvbpsi error (PSI decoder): TS discontinuity (received 15, expected 14)
libdvbpsi error (misc PSI): Bad CRC_32 (0xd360758c) !!!


Manu
-----------------------End of Old mail------------------------------



>
> Here is the scenario:
>   - A userspace soft opens a demux and set the filters for one PID
>     with CRC checking. For example for listening to PAT sections.
>   - You have some noise on the feed and the noise happens to be on
>     the second byte of the section (with more corrupted bytes
>     possible), just where the section_syntax_indicator flag lies.
>   - Since the dvb_dmx_swfilter_section_feed function doesn't check
>     the CRC when that flag is not set, the corrupted section is sent
>     to the user space which takes for granted that the CRC is checked
>     (used to be the case in my application).
>
> In my experiencem corruptions is always located when it will cause the
> biggest problems  ;-)
True, very true..

>
> I see two possible actions against that:
>
>   1) if the userspace asks for CRC checking and the
>      section_syntax_indicator is not set; then reject the section.
>
I think (1) would be better  ? May somebody who has some experience on that 
comment ?

>   2) put in the documentation this behaviour and tell that the user
>      space should check the section_syntax_indicator before parsing
>      the section.
>
> Warning, 1) is IMHO the best solution, but it may be breaking some
> applications that uses this behavior.
>
> CU
>
> -----Original Message-----
> From: linux-dvb-bounce@linuxtv.org
> To: linux-dvb@linuxtv.org
> Sent: 1/6/2005 8:02 PM
> Subject: [linux-dvb] Re: Bug in software demux still in 2.6.10
>
> > IMO it should be something like
> > if (!ccok && !dc_i)
> > because dc_i signals a discontinuity introduced by the transmitting
> > multiplexer, such that the assumption of data being lost does not
> > hold for this case.
> > However, if I understand ISO13818-1 correctly, one should also
> > have a look at wether the packet belongs to a PID carrying PCR or
> > not.
>
> Right, I should try (!ccok && !dc_i) and see if there's some
> noticeable change




Home | Main Index | Thread Index