Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Nasty bug in StillPicture()
Thomas Heiligenmann wrote:
>
> Stefan Huelswitt schrieb:
> > On 17 Oct 2003 Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote:
> >
> > Jut a few comments:
> >
>
> <snip>
>
> >> while (offs < Length && len > 0 && Data[offs] == 0xFF) {
> >> offs++;
> >> len--;
> >> }
> >
> >
> > This skips the stuffing bytes. I think mpeg2 can have stuffing
> > bytes too, so IMO this should be moved before the mpeg1/mpeg2
> > decision (before skip header extension).
> >
>
> Hm, are you sure? I haven't found it yet - maybe I'm misinterpreting the
> specs?
>
> If the stuffing bytes are placed similarly for MPEG-1 and MPEG-2
> streams, we should move the stuff accordingly.
>
> >
> >> if ((Data[offs] & 0xC0) == 0x40) {
> >> offs += 2;
> >> len -= 2;
> >> }
> >
> >
> >> if ((Data[offs] & 0xF0) == 0x20) {
> >> offs += 5;
> >> len -= 5;
> >> }
> >> else if ((Data[offs] & 0xF0) == 0x30) {
> >> offs += 10;
> >> len -= 10;
> >> }
> >> else if (Data[offs] == 0x0F) {
> >> offs++;
> >> len--;
> >> }
> >
> >
> > This skips the PTS/DTS infos. To be prepared for faulty streams
> > the last "else if" should be a simple "else" (the indicator byte has
> > to be skipped in any case).
> >
>
> Right, good point. Have a look at the attached patch. It also avoids
> len<0 (faulty streams etc.).
>
> Thomas
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> --- dvbdevice.c.orig 2003-09-06 15:19:33.000000000 +0200
> +++ dvbdevice.c 2003-10-18 14:03:39.000000000 +0200
> ...
Please make patches against (and test with) version 1.2.6pre1, which I have made
available today.
Klaus
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index