diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-07-26 12:14:33 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-07-26 12:14:33 +0000 |
commit | 6adbf616e4b012cc37d8e0300195bf8312e298c0 (patch) | |
tree | a5ae2ffb454cbf13b7ec00c1e99e767ffb5e844a /libmpcodecs | |
parent | 36d9999fadd7dbc1105fc94378d48c691134b694 (diff) |
restrict to YV12 since the default limit does not work well for anything else.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16108 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_cropdetect.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libmpcodecs/vf_cropdetect.c b/libmpcodecs/vf_cropdetect.c index e1a076376d..016644a3d9 100644 --- a/libmpcodecs/vf_cropdetect.c +++ b/libmpcodecs/vf_cropdetect.c @@ -138,11 +138,20 @@ if(++vf->priv->fno>2){ // ignore first 2 frames - they may be empty return vf_next_put_image(vf,dmpi); } +static int query_format(struct vf_instance_s* vf, unsigned int fmt) { + switch(fmt) { + // the default limit value works only right with YV12 right now. + case IMGFMT_YV12: + return vf_next_query_format(vf, fmt); + } + return 0; +} //===========================================================================// static int open(vf_instance_t *vf, char* args){ vf->config=config; vf->put_image=put_image; + vf->query_format=query_format; vf->priv=malloc(sizeof(struct vf_priv_s)); vf->priv->limit=24; // should be option vf->priv->round = 0; |