# HG changeset patch # User arpi # Date 1018198875 0 # Node ID 04a40454bdbbf622faac0c06c9defe1d26f9bf0e # Parent a3337d7b853ff6a8809ff336bc6c157aafadd074 accept only 4:2:0 planar yuv formats diff -r a3337d7b853f -r 04a40454bdbb libmpcodecs/vf_pp.c --- a/libmpcodecs/vf_pp.c Sun Apr 07 16:40:54 2002 +0000 +++ b/libmpcodecs/vf_pp.c Sun Apr 07 17:01:15 2002 +0000 @@ -5,6 +5,7 @@ #include "../config.h" #include "../mp_msg.h" +#include "../libvo/img_format.h" #include "../mp_image.h" #include "vf.h" @@ -17,6 +18,16 @@ //===========================================================================// +static int query_format(struct vf_instance_s* vf, unsigned int fmt){ + switch(fmt){ + case IMGFMT_YV12: + case IMGFMT_I420: + case IMGFMT_IYUV: + return vf_next_query_format(vf,fmt); + } + return 0; +} + static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){ if(vf->priv->pp&0xFFFF) return; // non-local filters enabled if((mpi->type==MP_IMGTYPE_IPB || vf->priv->pp) && @@ -62,6 +73,7 @@ static int open(vf_instance_t *vf, char* args){ char *endptr; + vf->query_format=query_format; vf->get_image=get_image; vf->put_image=put_image; vf->priv=malloc(sizeof(struct vf_priv_s));