comparison mpegvideo_enc.c @ 7767:f692318902dc libavcodec

Check ff_init_me()s return value.
author michael
date Mon, 01 Sep 2008 00:28:51 +0000
parents b8ad314749ff
children 635ed2559262
comparison
equal deleted inserted replaced
7766:10242bdaac34 7767:f692318902dc
2773 s->mb_intra=0; //for the rate distortion & bit compare functions 2773 s->mb_intra=0; //for the rate distortion & bit compare functions
2774 for(i=1; i<s->avctx->thread_count; i++){ 2774 for(i=1; i<s->avctx->thread_count; i++){
2775 ff_update_duplicate_context(s->thread_context[i], s); 2775 ff_update_duplicate_context(s->thread_context[i], s);
2776 } 2776 }
2777 2777
2778 ff_init_me(s); 2778 if(ff_init_me(s)<0)
2779 return -1;
2779 2780
2780 /* Estimate motion for every MB */ 2781 /* Estimate motion for every MB */
2781 if(s->pict_type != FF_I_TYPE){ 2782 if(s->pict_type != FF_I_TYPE){
2782 s->lambda = (s->lambda * s->avctx->me_penalty_compensation + 128)>>8; 2783 s->lambda = (s->lambda * s->avctx->me_penalty_compensation + 128)>>8;
2783 s->lambda2= (s->lambda2* (int64_t)s->avctx->me_penalty_compensation + 128)>>8; 2784 s->lambda2= (s->lambda2* (int64_t)s->avctx->me_penalty_compensation + 128)>>8;