rendered paste bodyIndex: libmpcodecs/vf.c
===================================================================
--- libmpcodecs/vf.c (revision 21180)
+++ libmpcodecs/vf.c (working copy)
@@ -668,7 +672,9 @@
}
int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi, double pts){
- return vf->next->put_image(vf->next,mpi, pts);
+ vf = vf->next;
+ while (vf->skip_filter) vf = vf->next;
+ return vf->put_image(vf,mpi, pts);
}
void vf_next_draw_slice(struct vf_instance_s* vf,unsigned char** src, int * stride,int w, int h, int x, int y){
Index: libmpcodecs/vf.h
===================================================================
--- libmpcodecs/vf.h (revision 21180)
+++ libmpcodecs/vf.h (working copy)
@@ -55,6 +55,7 @@
struct vf_instance_s* next;
mp_image_t *dmpi;
struct vf_priv_s* priv;
+ int skip_filter;
} vf_instance_t;
// control codes:
Index: libmpcodecs/dec_video.c
===================================================================
--- libmpcodecs/dec_video.c (revision 21180)
+++ libmpcodecs/dec_video.c (working copy)
@@ -385,7 +385,9 @@
unsigned int t2 = GetTimer();
vf_instance_t *vf = sh_video->vfilter;
// apply video filters and call the leaf vo/ve
-int ret = vf->put_image(vf,mpi, pts);
+int ret;
+while (vf->skip_filter) vf = vf->next;
+ret = vf->put_image(vf,mpi, pts);
if(ret>0) {
vf->control(vf,VFCTRL_DRAW_OSD,NULL);
#ifdef USE_ASS