[XviD-devel] a question about bitstream parsing in xvid decoding process

liang jian jianliang79 at gmail.com
Fri Aug 25 07:12:37 CEST 2006

Hello every one, I have a question about bitstream parsing in xvid decoding
As we know, Bitstream structure will hold two uint32_t values in bufa and
bufb, bufa is the uint32_t value of the current stream position, and bufb is
the uint32_t value next to bufa. Suppose someone use xvid to decode one
I-frame, and the last byte of the I-frame is the last byte of a page, and
the next page is an invalid page. After xvid has decoded the last block of
the last macroblcok in this frame, the Bitstream structure should have move
its position to the end of the buffer provided by  the user, a memory access
violation should have occured before this due to the read operation for bufa
and bufb. Can anybody explain how xvid prevent this memory access violation
from ocurring? thanks.

More information about the XviD-devel mailing list