# HG changeset patch # User reimar # Date 1230633509 0 # Node ID 245a232deb930d27a01c5bb5960b3140d85ed47c # Parent cb4a6bcebe0ad2de1beed1559b987018f8c8c13c Avoid flickering OSD with -vf yadif=1 diff -r cb4a6bcebe0a -r 245a232deb93 libmpcodecs/vf.c --- a/libmpcodecs/vf.c Mon Dec 29 19:09:45 2008 +0000 +++ b/libmpcodecs/vf.c Tue Dec 30 10:38:29 2008 +0000 @@ -655,6 +655,14 @@ 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; diff -r cb4a6bcebe0a -r 245a232deb93 libmpcodecs/vf.h --- a/libmpcodecs/vf.h Mon Dec 29 19:09:45 2008 +0000 +++ b/libmpcodecs/vf.h Tue Dec 30 10:38:29 2008 +0000 @@ -112,6 +112,7 @@ 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); diff -r cb4a6bcebe0a -r 245a232deb93 libmpcodecs/vf_yadif.c --- a/libmpcodecs/vf_yadif.c Mon Dec 29 19:09:45 2008 +0000 +++ b/libmpcodecs/vf_yadif.c Tue Dec 30 10:38:29 2008 +0000 @@ -440,7 +440,7 @@ 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;