[Mplayer-cvslog] CVS: main/libmpcodecs vf_vo.c,1.11,1.12

Alex Beregszaszi alex at mplayerhq.hu
Sun May 26 17:55:33 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv25893

Modified Files:
	vf_vo.c 
Log Message:
report error if bad dimensions requested (<=0)

Index: vf_vo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_vo.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- vf_vo.c	23 May 2002 14:07:11 -0000	1.11
+++ vf_vo.c	26 May 2002 15:55:29 -0000	1.12
@@ -18,6 +18,12 @@
         int width, int height, int d_width, int d_height,
 	unsigned int flags, unsigned int outfmt){
 
+    if ((width <= 0) || (height <= 0) || (d_width <= 0) || (d_height <= 0))
+    {
+	mp_msg(MSGT_CPLAYER, MSGL_ERR, "VO: invalid dimensions!\n");
+	return 0;
+    }
+
   if(video_out->get_info)
   { const vo_info_t *info = video_out->get_info();
     mp_msg(MSGT_CPLAYER,MSGL_INFO,"VO: [%s] %dx%d => %dx%d %s %s%s%s%s\n",info->short_name,




More information about the MPlayer-cvslog mailing list