summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-27 17:31:52 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-27 17:31:52 +0000
commit70e7a5533c9a8b7d695570c4ecfa42e9b2f420c1 (patch)
tree3c08cedf3449f0180f61ff1739bafec7a9909934 /libmpcodecs
parent62490c001c27601c93f940be33252de7b9cda3e7 (diff)
downloadmpv-70e7a5533c9a8b7d695570c4ecfa42e9b2f420c1.tar.bz2
mpv-70e7a5533c9a8b7d695570c4ecfa42e9b2f420c1.tar.xz
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)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8580 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index dd4f396915..61862a94f1 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -149,8 +149,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outf
// 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 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outf
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));