[mythtv] [PATCH] XVideo XvMC VLD broken

Terry Barnaby terry1 at beam.ltd.uk
Fri Apr 29 17:06:37 UTC 2005


Eureka !

I think I have tracked down the problem with the XvMC VLD breaking on
channel changes with TS streams.

I am no expert on libavformat or libavcodec, so some of the following
may not be correct ...

It appears that when the AVCodec is re-created on the TS stream changing
PID's it fails to re-create the MPEG parser to go along with it.
This results in the MPEG decoder getting a RAW stream rather than a
parsed stream. This breaks the AVCodec and then the VLD output.

I enclose a patch that fixes this for the XvMC VLD decoding and
prints an Error message whenever a parser cannot be created for
a Codec. I have also added an exit(1) in this case just so people are not
misled, however this may need to be removed ....

I suspect that the CODEC ID's for the standard XVMC and many other Codecs
will need to be added to the parser.c as well as I would have thought that
all of those not in the basic set (which is mainly software MPEG) would
fail similarly.

Actually, from my looking at libavcodec and libavformat it appears that
there is a bit of a miss use of the Codec ID. It appears, in some cases
to be used as a specific Codec ID and in other cases as a generic MPEG2
Codec identifier.
In fact there are some cases in the libavformat and libavcodec code
where the Codec ID is hard set to CODEC_ID_MPEG2VIDEO even if another Codec
is in use. (See: parser.c:389, mpegts.c:776, mpeg12.c:2174 etc).
I think this needs a look at by someone in the know ....

Anyway this patch works with MythTv CVS 2005-04-25.

I note that in the current CVS 2005-04-29 it does work, but the Video/Audio
AvSync has major issues with huge stutters. I presume this is due
to videoout_xv.c changes ....

Terry


-- 
Dr Terry Barnaby                     BEAM Ltd
Phone: +44 1454 324512               Northavon Business Center, Dean Rd
Fax:   +44 1454 313172               Yate, Bristol, BS37 5NH, UK
Email: terry at beam.ltd.uk             Web: www.beam.ltd.uk
BEAM for: Visually Impaired X-Terminals, Parallel Processing, Software
                       "Tandems are twice the fun !"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: xvmc_vld_1.patch
Type: text/x-patch
Size: 1330 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050429/8121b19f/xvmc_vld_1.bin


More information about the mythtv-dev mailing list