changeset 8367:14af7d96df34

Fix draw_slice() in passthrough mode. patch by Balatoni Denes <pnis@coder.hu>
author arpi
date Thu, 05 Dec 2002 00:22:37 +0000
parents 3e3b30d16719
children 1e3f010571fd
files libmpcodecs/vf.c libmpcodecs/vf.h libmpcodecs/vf_rotate.c
diffstat 3 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf.c	Thu Dec 05 00:18:56 2002 +0000
+++ b/libmpcodecs/vf.c	Thu Dec 05 00:22:37 2002 +0000
@@ -390,6 +390,10 @@
     return vf->next->put_image(vf->next,mpi);
 }
 
+void vf_next_draw_slice(struct vf_instance_s* vf,unsigned char** src, int * stride,int w, int h, int x, int y){
+    vf->next->draw_slice(vf->next,src,stride,w,h,x,y);
+}
+
 //============================================================================
 
 vf_instance_t* append_filters(vf_instance_t* last){
--- a/libmpcodecs/vf.h	Thu Dec 05 00:18:56 2002 +0000
+++ b/libmpcodecs/vf.h	Thu Dec 05 00:22:37 2002 +0000
@@ -78,6 +78,7 @@
 int vf_next_control(struct vf_instance_s* vf, int request, void* data);
 int vf_next_query_format(struct vf_instance_s* vf, unsigned int fmt);
 int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi);
+void vf_next_draw_slice (struct vf_instance_s* vf, unsigned char** src, int* stride, int w,int h, int x, int y);
 
 vf_instance_t* append_filters(vf_instance_t* last);
 
--- a/libmpcodecs/vf_rotate.c	Thu Dec 05 00:18:56 2002 +0000
+++ b/libmpcodecs/vf_rotate.c	Thu Dec 05 00:22:37 2002 +0000
@@ -61,6 +61,9 @@
     }
     if (vf->priv->direction & 4){
 	vf->put_image=vf_next_put_image; // passthru mode!
+	if (vf->next->draw_slice) vf->draw_slice=vf_next_draw_slice;
+/* FIXME: this should be in an other procedure in vf.c; that should always check
+     whether the filter after the passthrough one still (not)supports slices */
 	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);