[Mplayer-cvslog] CVS: main/libmpcodecs vf_cropdetect.c,1.2,1.3

Arpi of Ize arpi at mplayerhq.hu
Sat May 18 19:35:15 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv22201

Modified Files:
	vf_cropdetect.c 
Log Message:
ignore first 2 frames

Index: vf_cropdetect.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_cropdetect.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_cropdetect.c	18 May 2002 17:31:44 -0000	1.2
+++ vf_cropdetect.c	18 May 2002 17:35:12 -0000	1.3
@@ -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 @@
     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 @@
     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){
@@ -110,6 +112,8 @@
 	vf->priv->y1,vf->priv->y2,
 	(vf->priv->x2+1-x)&(~1),(vf->priv->y2+1-y)&(~1),x,y
 	  );
+
+}
 
     vf_next_put_image(vf,dmpi);
 }




More information about the MPlayer-cvslog mailing list