[MPlayer-cvslog] r23896 - in trunk: cfg-mplayer.h libvo/aspect.c

reimar subversion at mplayerhq.hu
Sun Jul 29 00:42:20 CEST 2007


Author: reimar
Date: Sun Jul 29 00:42:20 2007
New Revision: 23896

Log:
Use a new variable for user-supplied monitor-aspect so we can overwrite
a value generated from pixel-aspect if resolution changes


Modified:
   trunk/cfg-mplayer.h
   trunk/libvo/aspect.c

Modified: trunk/cfg-mplayer.h
==============================================================================
--- trunk/cfg-mplayer.h	(original)
+++ trunk/cfg-mplayer.h	Sun Jul 29 00:42:20 2007
@@ -99,7 +99,7 @@ extern int xinerama_screen;
 #endif
 
 /* from libvo/aspect.c */
-extern float monitor_aspect;
+extern float force_monitor_aspect;
 extern float monitor_pixel_aspect;
 
 extern int sws_flags;
@@ -213,7 +213,7 @@ m_option_t mplayer_opts[]={
 	// Geometry string
 	{"geometry", &vo_geometry, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	// set aspect ratio of monitor - useful for 16:9 TVout
-	{"monitoraspect", &monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 9.0, NULL},
+	{"monitoraspect", &force_monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 9.0, NULL},
 	{"monitorpixelaspect", &monitor_pixel_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 9.0, NULL},
 	// video mode switching: (x11,xv,dga)
         {"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1, NULL},

Modified: trunk/libvo/aspect.c
==============================================================================
--- trunk/libvo/aspect.c	(original)
+++ trunk/libvo/aspect.c	Sun Jul 29 00:42:20 2007
@@ -19,6 +19,7 @@ float vo_panscanrange = 1.0;
 
 #include "video_out.h"
 
+float force_monitor_aspect=0;
 float monitor_aspect=0;
 float monitor_pixel_aspect=1;
 extern float movie_aspect;
@@ -55,7 +56,9 @@ void aspect_save_screenres(int scrw, int
 #endif
   aspdat.scrw = scrw;
   aspdat.scrh = scrh;
-  if (!monitor_aspect)
+  if (force_monitor_aspect)
+    monitor_aspect = force_monitor_aspect;
+  else
     monitor_aspect = monitor_pixel_aspect * scrw / scrh;
 }
 



More information about the MPlayer-cvslog mailing list