[mythtv] Re: DVB fix?

William Uther willu.mailingLists at cse.unsw.edu.au
Sat Apr 9 02:35:18 UTC 2005


On Fri, 08 Apr 2005 15:22:21 +0200, Jesper Sörensen 
<jesper at datapartner.se> wrote:

> I don't have commit access so it's not me you need to convince, and I
> haven't worked on that part of the code before so my words probably
> don't carry a lot of weight but let me say some things anyway... :-)
>
> You obviously found a real bug but are you 100% sure that the cause
> really is that some channels don't set the PUSI flag on picture frame
> packets (sounds strange)? How did you arrive at that conclusion?

Yes, I'm sure.  I added instrumentation to print out each time I get a 
PUSI flag, each time I get a seq header, and each time I get a picture 
header (with and without the "stop scanning" stuff).  It is quite clear 
that the PUSI header is only set before SEQ headers on the broken 
channels, and is set before picture headers on those channels that 
work.  (in fact you can see the remains of this debugging in my patch - 
the patch also changes how "_last_seq_seen" is set - it is set by every 
seq header it sees, not just those used to make keyframes.)

This intense logging produces a huge amount of output, so I don't run 
it as my normal backend.  If someone want me to post these logs I will, 
but people have previously expressed a preference for not having huge 
logs dumped on them if not necessary.

After the logging, I then went and checked the spec.  By my reading of 
the MPEG2 spec (and I might have mis-read this - I am new to it), you 
must set the TS PUSI header at the start of a PES packet, and only at 
the start of a PES packet.  However, it seems to be legal to make those 
PES packets quite large and have them include multiple frames.

> I definitely think you are very close (expecially since you say your 
> patch
> works) but maybe there is a less intrusive way to fix it? (This code is
> used for ATSC/HDTV as well and it would suck to break something so 
> close
> to 0.18.)

In my original post, 
http://www.gossamer-threads.com/lists/mythtv/dev/121392 , I discuss 
another possible fix.  I don't know if that is more to your liking.  
I'd love a less intrusive way to fix this... given what I said above, 
can you see one?

As to breaking 0.18...  Current CVS is broken, and if this or a related 
fix doesn't go in then 0.18 will be broken for DVB TS in Aus (and from 
some reports Finland).  I'd agree with you about introducing stuff at 
this stage if it was a new feature, but it isn't.  It is a bug fix.

Also, this fix has been around for two weeks (although the non-broken 
patch is only 1 1/2 weeks old).  If ATSC people have actual problems 
with it, maybe they should post those problems so that I can fix the 
patch.  So far all I'm getting is people expressing vague doubts (Isaac 
says it is broken, but provides no evidence or explanation; you say its 
too intrusive).  How am I ever supposed to fix this problem?

> For what it's worth, do you think that the patch below could have an
> effect? It looks a bit weird with bit ops there so I think this patch
> makes the code do what the author actually meant? (Not sure if it
> actually matters with true/false stuff though and my brain isn't 
> running
> at 100% right now, Friday afternoon and all... 8-)

Tried that while investigating my fix.  I didn't expect it to have any 
effect, but I just wanted to clean that code up.  It didn't have any 
effect.  The cleanup became unnecessary when I just removed all that 
code.

Be well,

Will          :-}

--
Dr William Uther                           National ICT Australia
Phone: +61 2 9385 6357               Computer Science and Engineering
Email: willu at cse.unsw.edu.au          University of New South Wales
Web: http://www.cse.unsw.edu.au/~willu/     Sydney, Australia



More information about the mythtv-dev mailing list