int i;
ReSampleContext *audio_resample_init(int output_channels, int input_channels,                                       int output_rate, int input_rate){    ReSampleContext *s;    int i;        if ( input_channels > 2)      {	av_log(NULL, AV_LOG_ERROR, "Resampling with input channels greater than 2 unsupported.");	return NULL;      }    s = av_mallocz(sizeof(ReSampleContext));    if (!s)      {	av_log(NULL, AV_LOG_ERROR, "Can't allocate memory for resample context.");	return NULL;      }    s->ratio = (float)output_rate / (float)input_rate;        s->input_channels = input_channels;    s->output_channels = output_channels;        s->filter_channels = s->input_channels;    if (s->output_channels < s->filter_channels)        s->filter_channels = s->output_channels;/* * ac3 output is the only case where filter_channels could be greater than 2. * input channels can't be greater than 2, so resample the 2 channels and then * expand to 6 channels after the resampling. */    if(s->filter_channels>2)      s->filter_channels = 2;    s->resample_context= av_resample_init(output_rate, input_rate, 16, 10, 0, 1.0);        return s;}