From fd0fa7d6d10978d00f5578c999a81edabfd736e5 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 26 May 2002 15:55:29 +0000 Subject: [PATCH] report error if bad dimensions requested (<=0) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6198 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_vo.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c index c395cfc557..d5311375e6 100644 --- a/libmpcodecs/vf_vo.c +++ b/libmpcodecs/vf_vo.c @@ -18,6 +18,12 @@ static int config(struct vf_instance_s* vf, 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,