[Ffmpeg-cvslog] r6823 - trunk/libavcodec/mpegvideo.c
michael
subversion
Sat Oct 28 17:20:01 CEST 2006
Author: michael
Date: Sat Oct 28 17:20:00 2006
New Revision: 6823
Modified:
trunk/libavcodec/mpegvideo.c
Log:
prevent overflow if lambda2 is "too" large
Modified: trunk/libavcodec/mpegvideo.c
==============================================================================
--- trunk/libavcodec/mpegvideo.c (original)
+++ trunk/libavcodec/mpegvideo.c Sat Oct 28 17:20:00 2006
@@ -5579,7 +5579,7 @@
/* Estimate motion for every MB */
if(s->pict_type != I_TYPE){
s->lambda = (s->lambda * s->avctx->me_penalty_compensation + 128)>>8;
- s->lambda2= (s->lambda2* s->avctx->me_penalty_compensation + 128)>>8;
+ s->lambda2= (s->lambda2* (int64_t)s->avctx->me_penalty_compensation + 128)>>8;
if(s->pict_type != B_TYPE && s->avctx->me_threshold==0){
if((s->avctx->pre_me && s->last_non_b_pict_type==I_TYPE) || s->avctx->pre_me==2){
s->avctx->execute(s->avctx, pre_estimate_motion_thread, (void**)&(s->thread_context[0]), NULL, s->avctx->thread_count);
More information about the ffmpeg-cvslog
mailing list