summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-25 15:50:19 +0000
committerattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-25 15:50:19 +0000
commit113b85e0b7bebd95adcbc0ff23d8565f4a98e014 (patch)
tree3757d6892a852d8c0bc29081a8a14b2f840e6f1f
parent9e365fd95b412d8c857de7b2279f16b189313988 (diff)
downloadmpv-113b85e0b7bebd95adcbc0ff23d8565f4a98e014.tar.bz2
mpv-113b85e0b7bebd95adcbc0ff23d8565f4a98e014.tar.xz
fail with an error if the source resolution is larger than 1023x1023
when using -vo (x)mga git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18815 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--help/help_mp-en.h1
-rw-r--r--libvo/mga_common.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/help/help_mp-en.h b/help/help_mp-en.h
index af90d9eacd..b9c35a9f7a 100644
--- a/help/help_mp-en.h
+++ b/help/help_mp-en.h
@@ -1579,6 +1579,7 @@ static char help_text[]=
#define MSGTR_LIBVO_MGA_IncompatibleDriverVersion "Your mga_vid driver version is incompatible with this MPlayer version!\n"
#define MSGTR_LIBVO_MGA_UsingBuffers "Using %d buffers.\n"
#define MSGTR_LIBVO_MGA_CouldntOpen "Couldn't open: %s\n"
+#define MGSTR_LIBVO_MGA_ResolutionTooHigh "Source resolution is in at least one dimension larger than 1023x1023. Please rescale in software or use -lavdopts lowres=1\n"
// libvo/vesa_lvo.c
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index ba8fce6e57..a6a6e7b396 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -371,6 +371,12 @@ static int mga_init(int width,int height,unsigned int format){
return (-1);
}
+ if(width>1023 || height >1024)
+ {
+ mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh);
+ return (-1);
+ }
+
mga_vid_config.src_width = width;
mga_vid_config.src_height= height;
if(!mga_vid_config.dest_width)