[Xvid-devel] Bug in xvid_encraw (version 1.3.2)

Michael Militzer michael at xvid.org
Thu Jun 21 11:52:41 CEST 2012


Hi,

I've checked the issue and indeed you are right. Patch applied.

Thanks,
Michael


Quoting Jim Bennett <drj1270 at yahoo.com>:

> Let me know if I should report this bug elsewhere.
>
> I would attach diffs, but I don't have a way of testing the change.
>
> In the routine read_pgmdata, at line 1983, there is currently:
>
>         /*  I don't know why, but this seems needed */
>         fread(&dummy, 1, 1, handle);
>
>
> This read of a byte is indeed necessary, but it is in the wrong
> location.  It should be placed in read_pgmheader, following
> the fscanf (at line 1944).
>
> What's going on is that the fscanf reads the three integer fields
> and the terminating new line, but then it backs up one character,
> in case the terminating character needs to be processed.  So the
> fread of one byte is needed to gobble up that terminating
> character.
>
> With the current placement of the fread, the first frame of the
> video is actually read in incorrectly.  Somewhat surprisingly,
> the only visual artifact I noticed was that the left edge of the
> initial frame appeared to have some garbage pixels in it.
>
>
> - Jim Bennett
> _______________________________________________
> Xvid-devel mailing list
> Xvid-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>
>





More information about the Xvid-devel mailing list