--- trunk/xvidcore/src/bitstream/bitstream.c 2002/06/30 10:46:29 252 +++ trunk/xvidcore/src/bitstream/bitstream.c 2002/07/12 00:49:59 294 @@ -41,7 +41,10 @@ * * * Revision history: * * * - * 22.05.2002 bs_put_matrix fix + * 11.07.2002 add VOP width & height return to dec when dec->width * + * or dec->height is 0 (for use in examples/ex1.c) * + * MinChen * + * 22.05.2002 bs_put_matrix fix * * 20.05.2002 added BitstreamWriteUserData * * 19.06.2002 Fix a little bug in use custom quant matrix * * MinChen * @@ -359,6 +362,12 @@ DPRINTF(DPRINTF_HEADER, "width %i", width); DPRINTF(DPRINTF_HEADER, "height %i", height); + // for auto set width & height + if (dec->width == 0) + dec->width = width; + if (dec->height == 0) + dec->height = height; + if (width != dec->width || height != dec->height) { DPRINTF(DPRINTF_ERROR, "XVID_DEC_PARAM width/height does not match bitstream"); return -1;