[mythtv] [Experimental PATCH] BIG DVB PATCH V3.2 Released

Juha Kuikka juha.kuikka at gmail.com
Mon Dec 20 16:52:01 UTC 2004


On Tue, 21 Dec 2004 00:01:03 +0800, Tj <htpc at treblid.dyndns.org> wrote:
> Marcus Metzler wrote:

> For my broadcasts, what immediately comes after 0x00 0x00 0x00 0xbd is
> not 0x80. It's some arbitary number which follows no apparant pattern to
> me..

That is PES header's length field. For AC3 with the DVD header Mr
Metzler talked about the first byte os PES _payload_ is 0x80 - 0x87.
Description of PES packet can be found at ISO 13838-1 or ITU-T
H.222.0, they are the same document. If you do not have access to
those you can see for example
http://dvd.sourceforge.net/dvdinfo/pes-hdr.html .

> There will be a problem for me if I call "startcode = get_byte
> (&s->pb)", decrement the len var and then realised I did not get the
> range I want. because at the end of this function, I assign pstart_code
> to whatever comes after 0x00 0x00 0x00 0xbd, which appears to be random
> (not tested throughly).

> Everything else in myth expects a 0x80 after 0x00 0x00 0x00 0xbd, but my
> mythbox doesn't do that, causing mythfrontend to crash as it's not
> expecting that as a startcode.

No it does not, it expects 0x80 after PES header. Read
mpegps_read_pes_header carefully, before the line

"if (startcode == 0x1bd) {" 

the PES header is eaten away and "startcode = get_byte(&s->pb);" three
lines after reads the first byte of the payload.

> Without seeing 0x80, I can't really be sure that the private stream I'm
> handling is actually AC3 rite? How save is it to skip this block of

You can make a good estimate by looking if the first two bytes of PES
payload are AC3 frame start (0x0b 0x77).

> Is this a computer hardware, TV antenna issue or software issue? Is this
> a bad packet caused by a faulty/lousy antenna?

I'd guess software. I'll try to look into it.

 - Juha

-- 
Madness takes it's toll. Please have exact change.


More information about the mythtv-dev mailing list