[MPlayer-cvslog] CVS: main/libaf af.c,1.42,1.43 af.h,1.24,1.25

Alex Beregszaszi syncmail at mplayerhq.hu
Fri Feb 25 12:11:09 CET 2005


CVS change done by Alex Beregszaszi

Update of /cvsroot/mplayer/main/libaf
In directory mail:/var2/tmp/cvs-serv10026/libaf

Modified Files:
	af.c af.h 
Log Message:
finally remove the refences to bps outside libaf. also simplification of some messages and removed redundants

Index: af.c
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- af.c	21 Feb 2005 17:14:00 -0000	1.42
+++ af.c	25 Feb 2005 11:11:07 -0000	1.43
@@ -265,8 +265,7 @@
 	    return rv;
 	}
 	// Insert format filter
-	if(((af->prev?af->prev->data->format:s->input.format) != in.format) || 
-	   ((af->prev?af->prev->data->bps:s->input.bps) != in.bps)){
+	if((af->prev?af->prev->data->format:s->input.format) != in.format){
 	  // Create format filter
 	  if(NULL == (new = af_prepend(s,af,"format")))
 	    return AF_ERROR;
@@ -438,8 +437,7 @@
     }
     
     // Check output format fix if not OK
-    if((s->last->data->format != s->output.format) || 
-       (s->last->data->bps != s->output.bps)){
+    if(s->last->data->format != s->output.format){
       if(strcmp(s->last->info->name,"format"))
 	af = af_append(s,s->last,"format");
       else
@@ -457,7 +455,6 @@
       return -1;
 
     if((s->last->data->format != s->output.format) || 
-       (s->last->data->bps    != s->output.bps)    ||
        (s->last->data->nch    != s->output.nch)    || 
        (s->last->data->rate   != s->output.rate))  {
       // Something is stuffed audio out will not work 
@@ -698,3 +695,7 @@
   }
 }
 
+void af_fix_parameters(af_data_t *data)
+{
+    data->bps = af_fmt2bits(data->format)/8;
+}

Index: af.h
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- af.h	31 Jan 2005 11:43:08 -0000	1.24
+++ af.h	25 Feb 2005 11:11:07 -0000	1.25
@@ -214,6 +214,10 @@
 /** Print a list of all available audio filters */
 void af_help(void);
 
+/* Fill the missing parameters in the af_data_t structure.
+   Used for stuffing bps with a value based on format. */
+void af_fix_paramaters(af_data_t *data);
+
 /* Memory reallocation macro: if a local buffer is used (i.e. if the
    filter doesn't operate on the incoming buffer this macro must be
    called to ensure the buffer is big enough. */
@@ -269,5 +273,3 @@
 #endif
 
 #endif /* __aop_h__ */
-
-




More information about the MPlayer-cvslog mailing list