diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-05-18 17:35:12 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-05-18 17:35:12 +0000 |
commit | d341f0e32d550b810bd0b44718ad61aebbe8b832 (patch) | |
tree | c4b26814417364fd623a589e4cd5851fa441834a /libmpcodecs | |
parent | ba12a5e87a096156b82cdce212195eebe124d67d (diff) | |
download | mpv-d341f0e32d550b810bd0b44718ad61aebbe8b832.tar.bz2 mpv-d341f0e32d550b810bd0b44718ad61aebbe8b832.tar.xz |
ignore first 2 frames
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6119 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_cropdetect.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libmpcodecs/vf_cropdetect.c b/libmpcodecs/vf_cropdetect.c index 1a3851a349..fe2915dc27 100644 --- a/libmpcodecs/vf_cropdetect.c +++ b/libmpcodecs/vf_cropdetect.c @@ -16,6 +16,7 @@ struct vf_priv_s { int x1,y1,x2,y2; int limit; + int fno; }; static int checkline(unsigned char* src,int stride,int len,int bpp){ @@ -50,6 +51,7 @@ static int config(struct vf_instance_s* vf, vf->priv->y1=height; vf->priv->x2=0; vf->priv->y2=0; + vf->priv->fno=0; return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } @@ -72,7 +74,7 @@ static void put_image(struct vf_instance_s* vf, mp_image_t *mpi){ dmpi->width=mpi->width; dmpi->height=mpi->height; -//static int checkline(unsigned char* src,int stride,int len,int bpp){ +if(++vf->priv->fno>2){ // ignore first 2 frames - they may be empty for(y=0;y<vf->priv->y1;y++){ if(checkline(mpi->planes[0]+mpi->stride[0]*y,bpp,mpi->w,bpp)>vf->priv->limit){ @@ -111,6 +113,8 @@ static void put_image(struct vf_instance_s* vf, mp_image_t *mpi){ (vf->priv->x2+1-x)&(~1),(vf->priv->y2+1-y)&(~1),x,y ); +} + vf_next_put_image(vf,dmpi); } |