changeset 7979:64f468cbedcd

The default query_format shouldn't accept IMGFMT_MPEGPES
author albeu
date Wed, 30 Oct 2002 17:48:39 +0000
parents ab15849ec648
children 1f050e96ddee
files libmpcodecs/vf.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf.c	Wed Oct 30 17:45:44 2002 +0000
+++ b/libmpcodecs/vf.c	Wed Oct 30 17:48:39 2002 +0000
@@ -260,6 +260,12 @@
 
 //============================================================================
 
+// By default vf doesn't accept MPEGPES
+static int vf_default_query_format(struct vf_instance_s* vf, unsigned int fmt){
+  if(fmt == IMGFMT_MPEGPES) return 0;
+  return vf_next_query_format(vf,fmt);
+}
+
 vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, char *name, char *args){
     vf_instance_t* vf;
     int i;
@@ -276,7 +282,7 @@
     vf->next=next;
     vf->config=vf_next_config;
     vf->control=vf_next_control;
-    vf->query_format=vf_next_query_format;
+    vf->query_format=vf_default_query_format;
     vf->put_image=vf_next_put_image;
     vf->default_caps=VFCAP_ACCEPT_STRIDE;
     vf->default_reqs=0;