# HG changeset patch # User alex # Date 1041010312 0 # Node ID 8f6e84a2a431e59e3b5c086ccec7dc8024140bb2 # Parent a9d454af34979c5760c63a1a0106ca081728fb2e do not config video out system if input dimensions are invalid (triggered a segfault in vop_expand due to missing dimension checks, which bug was reported by gabucino) diff -r a9d454af3497 -r 8f6e84a2a431 libmpcodecs/vd.c --- a/libmpcodecs/vd.c Fri Dec 27 17:28:35 2002 +0000 +++ b/libmpcodecs/vd.c Fri Dec 27 17:31:52 2002 +0000 @@ -149,8 +149,7 @@ // vo_functions_t* video_out=sh->video_out; vf_instance_t* vf=sh->vfilter,*sc=NULL; -#if 1 - if(!(sh->disp_w && sh->disp_h)) + if(!sh->disp_w || !sh->disp_h) mp_msg(MSGT_DECVIDEO,MSGL_WARN, MSGTR_CodecDidNotSet); /* XXX: HACK, if sh->disp_* aren't set, * but we have w and h, set them :: atmos */ @@ -158,7 +157,9 @@ sh->disp_w=w; if(!sh->disp_h && h) sh->disp_h=h; -#endif + + if(!sh->disp_w || !sh->disp_h) + return 0; mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_VoConfigRequest,w,h,vo_format_name(preferred_outfmt));