diff libmpcodecs/vf_rotate.c @ 7871:7b7254cf6553

automatic rotation for mode 4..7, based on patch by Balatoni Denes <pnis@coder.hu>
author arpi
date Wed, 23 Oct 2002 17:51:49 +0000
parents a894e99c1e51
children 14af7d96df34
line wrap: on
line diff
--- a/libmpcodecs/vf_rotate.c	Wed Oct 23 17:42:12 2002 +0000
+++ b/libmpcodecs/vf_rotate.c	Wed Oct 23 17:51:49 2002 +0000
@@ -56,7 +56,13 @@
 static int config(struct vf_instance_s* vf,
         int width, int height, int d_width, int d_height,
 	unsigned int flags, unsigned int outfmt){
-    
+    if (vf->priv->direction & 4) {
+	if (width<height) vf->priv->direction&=3;
+    }
+    if (vf->priv->direction & 4){
+	vf->put_image=vf_next_put_image; // passthru mode!
+	return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
+    }
     return vf_next_config(vf,height,width,d_height,d_width,flags,outfmt);
 }