changeset 17198:961d9875c2f7

do not set the flag when config failed patch by Mikulas Patocka (mikulas at artax karlin mff cuni cz)
author henry
date Fri, 16 Dec 2005 18:32:58 +0000
parents 0ab565f7ed60
children 9164ef9a1834
files libmpcodecs/vf.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf.c	Thu Dec 15 20:39:59 2005 +0000
+++ b/libmpcodecs/vf.c	Fri Dec 16 18:32:58 2005 +0000
@@ -569,6 +569,7 @@
 		    int width, int height, int d_width, int d_height,
 		    unsigned int flags, unsigned int outfmt)
 {
+    int r;
     if ((vf->default_caps&VFCAP_CONSTANT) && vf->fmt.have_configured) {
         if ((vf->fmt.orig_width != width)
 	    || (vf->fmt.orig_height != height)
@@ -582,7 +583,9 @@
     vf->fmt.orig_height = height;
     vf->fmt.orig_width = width;
     vf->fmt.orig_fmt = outfmt;
-    return vf->config(vf, width, height, d_width, d_height, flags, outfmt);
+    r = vf->config(vf, width, height, d_width, d_height, flags, outfmt);
+    if (!r) vf->fmt.have_configured = 0;
+    return r;
 }
 
 int vf_next_config(struct vf_instance_s* vf,