[MPlayer-cvslog] r28209 - in trunk/libmpcodecs: vf.c vf.h vf_yadif.c

reimar subversion at mplayerhq.hu
Tue Dec 30 11:38:31 CET 2008


Author: reimar
Date: Tue Dec 30 11:38:29 2008
New Revision: 28209

Log:
Avoid flickering OSD with -vf yadif=1

Modified:
   trunk/libmpcodecs/vf.c
   trunk/libmpcodecs/vf.h
   trunk/libmpcodecs/vf_yadif.c

Modified: trunk/libmpcodecs/vf.c
==============================================================================
--- trunk/libmpcodecs/vf.c	Mon Dec 29 20:09:45 2008	(r28208)
+++ trunk/libmpcodecs/vf.c	Tue Dec 30 11:38:29 2008	(r28209)
@@ -655,6 +655,14 @@ int vf_next_control(struct vf_instance_s
     return vf->next->control(vf->next,request,data);
 }
 
+void vf_extra_flip(struct vf_instance_s* vf) {
+    vf_next_control(vf, VFCTRL_DRAW_OSD, NULL);
+#ifdef CONFIG_ASS
+    vf_next_control(vf, VFCTRL_DRAW_EOSD, NULL);
+#endif
+    vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
+}
+
 int vf_next_query_format(struct vf_instance_s* vf, unsigned int fmt){
     int flags=vf->next->query_format(vf->next,fmt);
     if(flags) flags|=vf->default_caps;

Modified: trunk/libmpcodecs/vf.h
==============================================================================
--- trunk/libmpcodecs/vf.h	Mon Dec 29 20:09:45 2008	(r28208)
+++ trunk/libmpcodecs/vf.h	Tue Dec 30 11:38:29 2008	(r28209)
@@ -112,6 +112,7 @@ int vf_next_config(struct vf_instance_s*
         int width, int height, int d_width, int d_height,
 	unsigned int flags, unsigned int outfmt);
 int vf_next_control(struct vf_instance_s* vf, int request, void* data);
+void vf_extra_flip(struct vf_instance_s* vf);
 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, double pts);
 void vf_next_draw_slice (struct vf_instance_s* vf, unsigned char** src, int* stride, int w,int h, int x, int y);

Modified: trunk/libmpcodecs/vf_yadif.c
==============================================================================
--- trunk/libmpcodecs/vf_yadif.c	Mon Dec 29 20:09:45 2008	(r28208)
+++ trunk/libmpcodecs/vf_yadif.c	Tue Dec 30 11:38:29 2008	(r28209)
@@ -440,7 +440,7 @@ static int continue_buffered_image(struc
         if (correct_pts)
             break;
         if(i<(vf->priv->mode&1))
-            vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
+            vf_extra_flip(vf);
     }
     vf->priv->buffered_i = 1;
     return ret;



More information about the MPlayer-cvslog mailing list