Index: libmpcodecs/vd_libmpeg2.c
===================================================================
--- libmpcodecs/vd_libmpeg2.c	(revision 20339)
+++ libmpcodecs/vd_libmpeg2.c	(working copy)
@@ -56,6 +56,8 @@
     return CONTROL_UNKNOWN;
 }
 
+static int vo_init_format;
+
 // init driver
 static int init(sh_video_t *sh){
     vd_libmpeg2_ctx_t *context;
@@ -89,6 +91,7 @@
 
     mpeg2dec->pending_buffer = 0;
     mpeg2dec->pending_length = 0;
+    vo_init_format = 0;
 
     return 1;
 }
@@ -157,6 +160,9 @@
 	int type, use_callback;
 	mp_image_t* mpi_new;
 	unsigned long pw, ph;
+	static int vo_init_width;
+	static int vo_init_height;
+	static float vo_init_aspect;
 	
 	switch(state){
 	case STATE_BUFFER:
@@ -176,15 +182,28 @@
 	    // video parameters inited/changed, (re)init libvo:
 	    if (info->sequence->width >> 1 == info->sequence->chroma_width &&
 		info->sequence->height >> 1 == info->sequence->chroma_height) {
+		if (vo_init_format == 1 && vo_init_aspect == sh->aspect &&
+		    vo_init_width == info->sequence->picture_width &&
+		    vo_init_height == info->sequence->picture_height)
+		  break;
 		if(!mpcodecs_config_vo(sh,
 				       info->sequence->picture_width,
 				       info->sequence->picture_height, IMGFMT_YV12)) return 0;
+		vo_init_format = 1;
 	    } else if (info->sequence->width >> 1 == info->sequence->chroma_width &&
 		info->sequence->height == info->sequence->chroma_height) {
+		if (vo_init_format == 2 && vo_init_aspect == sh->aspect &&
+		    vo_init_width == info->sequence->picture_width &&
+		    vo_init_height == info->sequence->picture_height)
+		  break;
 		if(!mpcodecs_config_vo(sh,
 				       info->sequence->picture_width,
 				       info->sequence->picture_height, IMGFMT_422P)) return 0;
+		vo_init_format = 2;
 	    } else return 0;
+	    vo_init_aspect = sh->aspect;
+	    vo_init_width = info->sequence->picture_width;
+	    vo_init_height = info->sequence->picture_height;
 	    break;
 	case STATE_PICTURE:
 	    type=info->current_picture->flags&PIC_MASK_CODING_TYPE;
