--- encoder.c 2002/09/29 15:53:42 1.76.2.5 +++ encoder.c 2002/09/30 14:16:02 1.76.2.8 @@ -39,7 +39,7 @@ * MinChen * 14.04.2002 added FrameCodeB() * - * $Id: encoder.c,v 1.76.2.5 2002/09/29 15:53:42 chl Exp $ + * $Id: encoder.c,v 1.76.2.8 2002/09/30 14:16:02 chl Exp $ * ****************************************************************************/ @@ -411,8 +411,10 @@ pEnc->queue_size = 0; pEnc->mbParam.m_stamp = 0; -; + pEnc->m_framenum = 0; + pEnc->current->stamp = 0; + pEnc->reference->stamp = 0; pParam->handle = (void *) pEnc; @@ -640,14 +642,14 @@ //HEAVY DEBUG OUTPUT remove when timecodes prove to be stable - fprintf(stderr,"WriteVop: %d - %d \n", +/* fprintf(stderr,"WriteVop: %d - %d \n", ((int32_t)pCur->stamp / time_base), ((int32_t)pRef->stamp / time_base)); fprintf(stderr,"set_timecodes: VOP %1d stamp=%lld ref_stamp=%lld base=%d\n", pCur->coding_type, pCur->stamp, pRef->stamp, time_base); fprintf(stderr,"set_timecodes: VOP %1d seconds=%d ticks=%d (ref-sec=%d ref-tick=%d)\n", pCur->coding_type, pCur->seconds, pCur->ticks, pRef->seconds, pRef->ticks); - +*/ } @@ -1110,6 +1112,8 @@ pEnc->current->motion_flags = pFrame->motion; pEnc->mbParam.hint = &pFrame->hint; + inc_frame_num(pEnc); + /* disable alternate scan flag if interlacing is not enabled */ if ((pEnc->current->global_flags & XVID_ALTERNATESCAN) && !(pEnc->current->global_flags & XVID_INTERLACING)) @@ -1244,7 +1248,6 @@ DEBUG(temp); #endif - inc_frame_num(pEnc); pEnc->iFrameNum++; stop_global_timer();