diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-02-25 11:11:07 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-02-25 11:11:07 +0000 |
commit | 6dbf6b4df117ae2dcace55f7e592a20fb81795be (patch) | |
tree | cdd2b17b355d8f2973a4328fafed66612b5ef154 /libaf | |
parent | fb3854d760b559816ed05c844188775129a3edf9 (diff) | |
download | mpv-6dbf6b4df117ae2dcace55f7e592a20fb81795be.tar.bz2 mpv-6dbf6b4df117ae2dcace55f7e592a20fb81795be.tar.xz |
finally remove the refences to bps outside libaf. also simplification of some messages and removed redundants
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14819 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libaf')
-rw-r--r-- | libaf/af.c | 11 | ||||
-rw-r--r-- | libaf/af.h | 6 |
2 files changed, 10 insertions, 7 deletions
diff --git a/libaf/af.c b/libaf/af.c index cbafe3a5e6..b14f578860 100644 --- a/libaf/af.c +++ b/libaf/af.c @@ -265,8 +265,7 @@ int af_reinit(af_stream_t* s, af_instance_t* af) 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 @@ int af_init(af_stream_t* s, int force_output) } // 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 @@ int af_init(af_stream_t* s, int force_output) 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_help (void) { } } +void af_fix_parameters(af_data_t *data) +{ + data->bps = af_fmt2bits(data->format)/8; +} diff --git a/libaf/af.h b/libaf/af.h index 03c825a20e..d4ff9d1c30 100644 --- a/libaf/af.h +++ b/libaf/af.h @@ -214,6 +214,10 @@ float af_softclip(float a); /** 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 @@ extern af_msg_cfg_t af_msg_cfg; // Message #endif #endif /* __aop_h__ */ - - |