changeset 18811:e23a1c57c406

fail with an error if the source resolution is larger than 1023x1023 when using -vo (x)mga
author attila
date Sun, 25 Jun 2006 15:50:19 +0000
parents f6bd47b9ed4f
children 5a18e3706ce5
files help/help_mp-en.h libvo/mga_common.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/help/help_mp-en.h	Sun Jun 25 14:03:56 2006 +0000
+++ b/help/help_mp-en.h	Sun Jun 25 15:50:19 2006 +0000
@@ -1579,6 +1579,7 @@
 #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
 
--- a/libvo/mga_common.c	Sun Jun 25 14:03:56 2006 +0000
+++ b/libvo/mga_common.c	Sun Jun 25 15:50:19 2006 +0000
@@ -371,6 +371,12 @@
             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)