diff options
author | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-10 18:05:18 +0000 |
---|---|---|
committer | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-10 18:05:18 +0000 |
commit | 945cb3447e83464d2496225a54e198be047a1b5d (patch) | |
tree | d0251c190deb17c0234560f35ef78c515fe18c97 | |
parent | ce01be84d13e1cf2621b2082dfa3e9d27def92c5 (diff) |
Use AF_NCH for max number of channels instead of private CHANS define.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22196 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libaf/af_lavcresample.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libaf/af_lavcresample.c b/libaf/af_lavcresample.c index c988aa671a..84e709f739 100644 --- a/libaf/af_lavcresample.c +++ b/libaf/af_lavcresample.c @@ -17,14 +17,12 @@ #include "rational.h" #endif -#define CHANS 6 - int64_t ff_gcd(int64_t a, int64_t b); // Data for specific instances of this filter typedef struct af_resample_s{ struct AVResampleContext *avrctx; - int16_t *in[CHANS]; + int16_t *in[AF_NCH]; int in_alloc; int index; @@ -48,7 +46,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg) return AF_DETACH; af->data->nch = data->nch; - if (af->data->nch > CHANS) af->data->nch = CHANS; + if (af->data->nch > AF_NCH) af->data->nch = AF_NCH; af->data->format = AF_FORMAT_S16_NE; af->data->bps = 2; af->mul.n = af->data->rate; @@ -99,7 +97,7 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data) int chans = data->nch; int in_len = data->len/(2*chans); int out_len = (in_len*af->mul.n) / af->mul.d + 10; - int16_t tmp[CHANS][out_len]; + int16_t tmp[AF_NCH][out_len]; if(AF_OK != RESIZE_LOCAL_BUFFER(af,data)) return NULL; |