From c9052b1092848d1fd562f11582e91c3bc6d69702 Mon Sep 17 00:00:00 2001 From: anders Date: Fri, 17 Jan 2003 01:00:07 +0000 Subject: Adding support for more logical libaf configuration git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8970 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'libaf/af.c') diff --git a/libaf/af.c b/libaf/af.c index ca2dc7a75f..bfbd8c4bfb 100644 --- a/libaf/af.c +++ b/libaf/af.c @@ -310,9 +310,12 @@ void af_uninit(af_stream_t* s) 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; @@ -346,6 +349,12 @@ int af_init(af_stream_t* s) 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){ af_instance_t* af = NULL; // New filter -- cgit v1.2.3