--- MPlayer-1.0rc1/libmpcodecs/vd.c.ori	2006-10-22 19:32:24.000000000 -0300
+++ MPlayer-1.0rc1/libmpcodecs/vd.c	2007-03-18 13:58:25.286061897 -0300
@@ -253,6 +253,18 @@
   if(movie_aspect>-1.0) sh->aspect = movie_aspect; // cmdline overrides autodetect
 //  if(!sh->aspect) sh->aspect=1.0;
 
+  if (sh->aspect <= 0.0)
+   sh->aspect=(double)w/(double)h; //start aspect "autodetection"
+//  Normalize aspect.
+//  TODO: add command line flag to enable/disable aspect normalizing.
+//  TODO: Tolerate/ignore less than 10% difference.
+  if (sh->aspect <= (4.0/3.0+16.0/9.0)/2.0)
+    sh->aspect=4.0/3.0;
+  else if (sh->aspect <= (16.0/9.0+2.35)/2.0)
+    sh->aspect=16.0/9.0;
+  else
+    sh->aspect=2.35;
+
   if(opt_screen_size_x||opt_screen_size_y){
     screen_size_x = opt_screen_size_x;
     screen_size_y = opt_screen_size_y;

