[MPlayer-dev-eng] [PATCH] Add IMGFMT_444P and IMGFMT_422P to vo_md5sum.c
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Tue Jun 8 23:22:15 CEST 2010
On Tue, Jun 08, 2010 at 09:46:53PM +0200, Giorgio wrote:
> Index: libmpcodecs/vf.c
> ===================================================================
> --- libmpcodecs/vf.c (revision 31347)
> +++ libmpcodecs/vf.c (working copy)
> @@ -426,11 +426,6 @@
>
> //============================================================================
>
> -// By default vf doesn't accept MPEGPES
> -static int vf_default_query_format(struct vf_instance *vf, unsigned int fmt){
> - if(fmt == IMGFMT_MPEGPES) return 0;
> - return vf_next_query_format(vf,fmt);
> -}
>
> vf_instance_t* vf_open_plugin(const vf_info_t* const* filter_list, vf_instance_t* next, const char *name, char **args){
> vf_instance_t* vf;
> @@ -448,7 +443,7 @@
> vf->next=next;
> vf->config=vf_next_config;
> vf->control=vf_next_control;
> - vf->query_format=vf_default_query_format;
> + vf->query_format=vf_next_query_format;
> vf->put_image=vf_next_put_image;
> vf->default_caps=VFCAP_ACCEPT_STRIDE;
> vf->default_reqs=0;
> @@ -676,7 +671,10 @@
> }
>
> int vf_next_query_format(struct vf_instance *vf, unsigned int fmt){
> - int flags=vf->next->query_format(vf->next,fmt);
> + int flags;
> + // By default vf doesn't accept MPEGPES
> + if(fmt == IMGFMT_MPEGPES) return 0;
> + flags=vf->next->query_format(vf->next,fmt);
> if(flags) flags|=vf->default_caps;
> return flags;
> }
Not possible, adding the check here means no video filter will ever be able to
accept IMGFMT_MPEGPES (as a last step, every filter calles vf_next_query_format,
if for a certain image format vf_next_query_format always fails, every
filter will fail for that).
More information about the MPlayer-dev-eng
mailing list