summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-26 15:55:29 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-26 15:55:29 +0000
commitfd0fa7d6d10978d00f5578c999a81edabfd736e5 (patch)
tree421098ab5725c73a293f97f161716155e8781291 /libmpcodecs
parentc79050c108309455ac028ab424e309a46aa7dab9 (diff)
downloadmpv-fd0fa7d6d10978d00f5578c999a81edabfd736e5.tar.bz2
mpv-fd0fa7d6d10978d00f5578c999a81edabfd736e5.tar.xz
report error if bad dimensions requested (<=0)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6198 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf_vo.c6
1 files changed, 6 insertions, 0 deletions
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,