Mercurial > mplayer.hg
changeset 23876:b38974c30ed6
Use a new variable for user-supplied monitor-aspect so we can overwrite
a value generated from pixel-aspect if resolution changes
author | reimar |
---|---|
date | Sat, 28 Jul 2007 22:42:20 +0000 |
parents | df05ff41590e |
children | f3db21f1963b |
files | cfg-mplayer.h libvo/aspect.c |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/cfg-mplayer.h Sat Jul 28 22:21:29 2007 +0000 +++ b/cfg-mplayer.h Sat Jul 28 22:42:20 2007 +0000 @@ -99,7 +99,7 @@ #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 @@ // 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},
--- a/libvo/aspect.c Sat Jul 28 22:21:29 2007 +0000 +++ b/libvo/aspect.c Sat Jul 28 22:42:20 2007 +0000 @@ -19,6 +19,7 @@ #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 @@ #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; }