[Mplayer-cvslog] CVS: main/libaf af.c,1.23,1.24 af.h,1.17,1.18

Anders Johansson CVS anders at mplayerhq.hu
Fri Jan 17 02:00:26 CET 2003


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

Modified Files:
	af.c af.h 
Log Message:
Adding support for more logical libaf configuration

Index: af.c
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- af.c	7 Jan 2003 10:33:30 -0000	1.23
+++ af.c	17 Jan 2003 01:00:07 -0000	1.24
@@ -310,9 +310,12 @@
    and output should contain the format of the current movie and the
    formate of the preferred output respectively. The function is
    reentrant i.e. if called with an already initialized stream the
-   stream will be reinitialized. The return value is 0 if success and
-   -1 if failure */
-int af_init(af_stream_t* s)
+   stream will be reinitialized. If the binary parameter
+   "force_output" is set, the output format will be converted to the
+   format given in "s", otherwise the output fromat in the last filter
+   will be copied "s". The return value is 0 if success and -1 if
+   failure */
+int af_init(af_stream_t* s, int force_output)
 {
   int i=0;
 
@@ -345,6 +348,12 @@
   // Init filters 
   if(AF_OK != af_reinit(s,s->first))
     return -1;
+
+  // If force_output isn't set do not compensate for output format
+  if(!force_output){
+    memcpy(&s->output, s->last->data, sizeof(af_data_t));
+    return 0;
+  }
 
   // Check output format
   if((AF_INIT_TYPE_MASK & s->cfg.force) != AF_INIT_FORCE){

Index: af.h
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- af.h	15 Jan 2003 11:16:29 -0000	1.17
+++ af.h	17 Jan 2003 01:00:07 -0000	1.18
@@ -124,10 +124,13 @@
    if necessary according to the values set in input and output. Input
    and output should contain the format of the current movie and the
    formate of the preferred output respectively. The function is
-   reentrant i.e. if called wit an already initialized stream the
-   stream will be reinitialized. The return value is 0 if success and
-   -1 if failure */
-int af_init(af_stream_t* s);
+   reentrant i.e. if called with an already initialized stream the
+   stream will be reinitialized. If the binary parameter
+   "force_output" is set, the output format will be converted to the
+   format given in "s", otherwise the output fromat in the last filter
+   will be copied "s". The return value is 0 if success and -1 if
+   failure */
+int af_init(af_stream_t* s, int force_output);
 
 // Uninit and remove all filters
 void af_uninit(af_stream_t* s);



More information about the MPlayer-cvslog mailing list