--- branches/dev-api-4/xvidcore/src/plugins/plugin_2pass2.c 2003/06/09 13:55:56 1054 +++ branches/dev-api-4/xvidcore/src/plugins/plugin_2pass2.c 2003/06/10 10:12:24 1063 @@ -25,7 +25,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: plugin_2pass2.c,v 1.1.2.20 2003-06-09 13:55:07 edgomez Exp $ + * $Id: plugin_2pass2.c,v 1.1.2.21 2003-06-10 10:12:24 suxen_drol Exp $ * *****************************************************************************/ @@ -244,7 +244,11 @@ } /* Compute the target filesize */ - if (rc->num_frames < create->fbase/create->fincr) { + if (rc->param.bitrate<0) { + /* if negative, bitrate equals the target (int kbytes) */ + rc->target = (-rc->param.bitrate) * 1024; + + }else if (rc->num_frames < create->fbase/create->fincr) { /* Source sequence is less than 1s long, we do as if it was 1s long */ rc->target = rc->param.bitrate / 8; } else {