Bug in xvid_encraw (version 1.3.2)
Jim Bennett <[email protected]> Tue, 19 Jun 2012 11:40:04 -0700 (PDT)
| Newsgroups | gmane.comp.video.xvid.devel |
|---|---|
| Message-ID | <[email protected]> |
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: =A0=A0=A0=A0=A0=A0=A0 /*=A0 I don't know why, but this seems needed */ =A0=A0=A0=A0=A0=A0=A0 fread(&dummy, 1, 1, handle); This read of a byte is indeed necessary, but it is in the wrong location.=A0 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.=A0 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.=A0 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