--- encoder.c 2006/03/03 11:54:58 1.128 +++ encoder.c 2010/03/09 10:00:14 1.131 @@ -3,9 +3,9 @@ * XVID MPEG-4 VIDEO CODEC * - Encoder main module - * - * Copyright(C) 2002 Michael Militzer - * 2002-2003 Peter Ross - * 2002 Daniel Smith + * Copyright(C) 2002-2010 Michael Militzer + * 2002-2003 Peter Ross + * 2002 Daniel Smith * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +21,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: encoder.c,v 1.128 2006/03/03 11:54:58 syskin Exp $ + * $Id: encoder.c,v 1.131 2010/03/09 10:00:14 Isibaar Exp $ * ****************************************************************************/ @@ -435,7 +435,7 @@ /* timestamp stuff */ pEnc->mbParam.m_stamp = 0; - pEnc->m_framenum = 0; + pEnc->m_framenum = create->start_frame_num; pEnc->current->stamp = 0; pEnc->reference->stamp = 0; @@ -770,6 +770,7 @@ if(pEnc->mbParam.plugin_flags & XVID_REQLAMBDA) { int block = 0; + emms(); data.lambda = pEnc->temp_lambda; for(i = 0;i < pEnc->mbParam.mb_height; i++) for(j = 0;j < pEnc->mbParam.mb_width; j++) @@ -1306,8 +1307,9 @@ if (pEnc->current->stamp > 0) { call_plugins(pEnc, pEnc->reference, &pEnc->sOriginal, XVID_PLG_AFTER, NULL, NULL, stats); } - else - stats->type = XVID_TYPE_NOTHING; + else if (stats) { + stats->type = XVID_TYPE_NOTHING; + } } /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%