--- trunk/xvidcore/src/bitstream/bitstream.c 2004/07/09 14:54:28 1480 +++ trunk/xvidcore/src/bitstream/bitstream.c 2004/10/03 16:20:51 1553 @@ -20,7 +20,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: bitstream.c,v 1.45 2004-07-09 14:52:56 syskin Exp $ + * $Id: bitstream.c,v 1.47 2004-10-03 16:20:51 syskin Exp $ * ****************************************************************************/ @@ -395,7 +395,7 @@ int32_t time_increment = 0; int resize = 0; - do { + while ((BitstreamPos(bs) >> 3) + 4 <= bs->length) { BitstreamByteAlign(bs); start_code = BitstreamShowBits(bs, 32); @@ -992,6 +992,7 @@ BitstreamSkip(bs, 32); /* user_data_start_code */ + memset(tmp, 0, 256); tmp[0] = BitstreamShowBits(bs, 8); for(i = 1; i < 256; i++){ @@ -1037,7 +1038,6 @@ BitstreamSkip(bs, 8); } } - while ((BitstreamPos(bs) >> 3) < bs->length); #if 0 DPRINTF("*** WARNING: no vop_start_code found");