--- trunk/xvidcore/src/bitstream/bitstream.c 2004/05/31 21:36:23 1466 +++ trunk/xvidcore/src/bitstream/bitstream.c 2004/09/04 14:16:24 1547 @@ -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.44 2004-05-31 21:36:23 edgomez Exp $ + * $Id: bitstream.c,v 1.46 2004-09-04 14:16:24 edgomez Exp $ * ****************************************************************************/ @@ -71,8 +71,10 @@ matrix[scan_tables[0][i++]] = value; } while (value != 0 && i < 64); - i--; /* fix little bug at coeff not full */ + if (value != 0) return; + + i--; while (i < 64) { matrix[scan_tables[0][i++]] = last; } @@ -990,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++){