--- libmpcodecs/vf.c	2006-01-22 19:11:35.000000000 +0100
+++ libmpcodecs/vf.c	2006-02-07 22:10:55.000000000 +0100
@@ -579,12 +579,15 @@
         }
         return 1;
     }
+    if (vf->fmt.have_configured && vf->fmt.orig_height == height && vf->fmt.orig_width == width &&
+	vf->fmt.d_width==d_width && vf->fmt.d_height==d_height &&
+	vf->fmt.orig_fmt == outfmt) return 1;
     vf->fmt.have_configured = 1;
     vf->fmt.orig_height = height;
     vf->fmt.orig_width = width;
     vf->fmt.orig_fmt = outfmt;
     r = vf->config(vf, width, height, d_width, d_height, flags, outfmt);
-    if (!r) vf->fmt.have_configured = 0;
+    if (!r) vf->fmt.have_configured = 0; else {vf->fmt.d_width=d_width; vf->fmt.d_height=d_height;}
     return r;
 }
 
--- libmpcodecs/vf.h	2005-09-11 08:41:04.000000000 +0200
+++ libmpcodecs/vf.h	2006-02-07 20:44:24.000000000 +0100
@@ -22,6 +22,7 @@
 typedef struct vf_format_context_t {
     int have_configured;
     int orig_width, orig_height, orig_fmt;
+    int d_width, d_height;
 } vf_format_context_t;
 
 typedef struct vf_instance_s {
