[Mplayer-cvslog] CVS: main/libmpcodecs vd.c,1.63,1.64
Alex Beregszaszi
alex at mplayerhq.hu
Fri Dec 27 18:31:55 CET 2002
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv21280
Modified Files:
vd.c
Log Message:
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)
Index: vd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- vd.c 26 Nov 2002 22:54:59 -0000 1.63
+++ vd.c 27 Dec 2002 17:31:52 -0000 1.64
@@ -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));
More information about the MPlayer-cvslog
mailing list