A little hack for -vf expand: expand with no arguments does nothing; with this
patch it automatically calculates expanded size to match monitor_aspect based
on original frame dimensions. Useful for having subtitles at the very bottom
of the screen instead of bottom of video frame.

Index: mplayer/mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.216
diff -u -r1.216 mencoder.c
--- mplayer/mencoder.c	13 Jul 2003 15:38:33 -0000	1.216
+++ mplayer/mencoder.c	14 Jul 2003 11:29:41 -0000
@@ -181,7 +181,7 @@
 char *info_sourceform=NULL;
 char *info_comment=NULL;
 
-
+float monitor_aspect = 4.0/3.0;	// for libmpcodecs/vf_expand.c
 
 //char *out_audio_codec=NULL; // override audio codec
 //char *out_video_codec=NULL; // override video codec
Index: mplayer/libmpcodecs/vf_expand.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_expand.c,v
retrieving revision 1.26
diff -u -r1.26 vf_expand.c
--- mplayer/libmpcodecs/vf_expand.c	19 Jun 2003 18:26:13 -0000	1.26
+++ mplayer/libmpcodecs/vf_expand.c	14 Jul 2003 11:30:38 -0000
@@ -157,11 +157,23 @@
 #endif
 //===========================================================================//
 
+extern float monitor_aspect;	// from ../libvo/aspect.c
+
 static int config(struct vf_instance_s* vf,
         int width, int height, int d_width, int d_height,
 	unsigned int flags, unsigned int outfmt){
     if (outfmt == IMGFMT_IF09) return 0;
     // calculate the missing parameters:
+    if (vf->priv->exp_w == -1 && vf->priv->exp_h == -1) {
+	int tmp_d = (float)width / monitor_aspect;
+	if (tmp_d > height) {
+	    vf->priv->exp_w = width;
+	    vf->priv->exp_h = tmp_d;
+	} else {
+	    vf->priv->exp_w = (float)height * monitor_aspect;
+	    vf->priv->exp_h = height;
+	}
+    }
 #if 0
     if(vf->priv->exp_w<width) vf->priv->exp_w=width;
     if(vf->priv->exp_h<height) vf->priv->exp_h=height;
