Index: libmpcodecs/vd_libmpeg2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_libmpeg2.c,v
retrieving revision 1.40
diff -u -r1.40 vd_libmpeg2.c
--- libmpcodecs/vd_libmpeg2.c	18 Nov 2005 14:39:22 -0000	1.40
+++ libmpcodecs/vd_libmpeg2.c	26 Apr 2006 22:37:54 -0000
@@ -29,6 +29,8 @@
 
 #include "cpudetect.h"
 
+extern void fill_mpeg12_aspect_info (float * aspect);
+
 // to set/get/query special features/parameters
 static int control(sh_video_t *sh,int cmd,void* arg,...){
     mpeg2dec_t * mpeg2dec = sh->context;
@@ -156,6 +158,7 @@
 	    // video parameters inited/changed, (re)init libvo:
 	    if (info->sequence->width >> 1 == info->sequence->chroma_width &&
 		info->sequence->height >> 1 == info->sequence->chroma_height) {
+		fill_mpeg12_aspect_info(&sh->aspect);
 		if(!mpcodecs_config_vo(sh,
 				       info->sequence->picture_width,
 				       info->sequence->picture_height, IMGFMT_YV12)) return 0;
Index: libmpdemux/video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/video.c,v
retrieving revision 1.62
diff -u -r1.62 video.c
--- libmpdemux/video.c	23 Apr 2006 12:29:10 -0000	1.62
+++ libmpdemux/video.c	26 Apr 2006 22:37:54 -0000
@@ -42,6 +42,35 @@
 static int telecine=0;
 static float telecine_cnt=-2.5;
 
+void fill_mpeg12_aspect_info (float * aspect){
+    switch(picture.aspect_ratio_information){
+        case 2:  // PAL/NTSC SVCD/DVD 4:3
+        case 8:  // PAL VCD 4:3
+        case 12: // NTSC VCD 4:3
+            *aspect=4.0/3.0;
+        break;
+        case 3:  // PAL/NTSC Widescreen SVCD/DVD 16:9
+        case 6:  // (PAL?)/NTSC Widescreen SVCD 16:9
+            *aspect=16.0/9.0;
+        break;
+        case 4:  // according to ISO-138182-2 Table 6.3
+            *aspect=2.21;
+        break;
+        case 9: // Movie Type ??? / 640x480
+            *aspect=0.0;
+        break;
+        default:
+            mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Detected unknownaspect_ratio_information in mpeg sequence header.\n"
+               "Please report the aspect value (%i) along with the movie type(VGA,PAL,NTSC,"
+               "SECAM) and the movie resolution (720x576,352x240,480x480,...)to the MPlayer"
+               " developers, so that we can add support for it!\nAssuming 1:1aspect for now.\n",
+               picture.aspect_ratio_information);
+        case 1:  // VGA 1:1 - do not prescale
+            *aspect=0.0;
+        break;
+    }
+}
+
 int video_read_properties(sh_video_t *sh_video){
 demux_stream_t *d_video=sh_video->ds;
 
@@ -326,34 +355,7 @@
    }
    
 //   printf("picture.fps=%d\n",picture.fps);
-   
-   // fill aspect info:
-   switch(picture.aspect_ratio_information){
-     case 2:  // PAL/NTSC SVCD/DVD 4:3
-     case 8:  // PAL VCD 4:3
-     case 12: // NTSC VCD 4:3
-       sh_video->aspect=4.0/3.0;
-     break;
-     case 3:  // PAL/NTSC Widescreen SVCD/DVD 16:9
-     case 6:  // (PAL?)/NTSC Widescreen SVCD 16:9
-       sh_video->aspect=16.0/9.0;
-     break;
-     case 4:  // according to ISO-138182-2 Table 6.3
-       sh_video->aspect=2.21;
-       break;
-     case 9: // Movie Type ??? / 640x480
-       sh_video->aspect=0.0;
-     break;
-     default:
-       mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Detected unknown aspect_ratio_information in mpeg sequence header.\n"
-               "Please report the aspect value (%i) along with the movie type (VGA,PAL,NTSC,"
-               "SECAM) and the movie resolution (720x576,352x240,480x480,...) to the MPlayer"
-               " developers, so that we can add support for it!\nAssuming 1:1 aspect for now.\n",
-               picture.aspect_ratio_information);
-     case 1:  // VGA 1:1 - do not prescale
-       sh_video->aspect=0.0;
-     break;
-   }
+   fill_mpeg12_aspect_info(&sh_video->aspect);   
    // display info:
    sh_video->format=picture.mpeg1?0x10000001:0x10000002; // mpeg video
    sh_video->fps=picture.fps;
