--- plugin_2pass2.c 2004/01/07 13:51:24 1.1.2.34 +++ plugin_2pass2.c 2004/01/22 20:54:31 1.1.2.36 @@ -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.34 2004/01/07 13:51:24 edgomez Exp $ + * $Id: plugin_2pass2.c,v 1.1.2.36 2004/01/22 20:54:31 edgomez Exp $ * *****************************************************************************/ @@ -617,18 +617,12 @@ #ifdef PASS_SMALLER if (dbytes > s->length) { dbytes = s->length; - } else + } #endif - if (dbytes < rc->min_length[s->type-1]) { + + /* Prevent stupid desired sizes under logical values */ + if (dbytes < rc->min_length[s->type-1]) { dbytes = rc->min_length[s->type-1]; - } else if (dbytes > rc->max_length) { - /* ToDo: this condition is always wrong as max_length == maximum frame - * length of first pass, so the first condition already caps the frame - * size... */ - capped_to_max_framesize = 1; - dbytes = rc->max_length; - DPRINTF(XVID_DEBUG_RC,"[xvid rc] -- frame:%d Capped to maximum frame size\n", - data->frame_num); } /*------------------------------------------------------------------------