return NULL;
{ printf("Can't allocate memory for resample context."); return NULL; }
ReSampleContext *audio_resample_init(int output_channels, int input_channels,                                       int output_rate, int input_rate){    ReSampleContext *s;    int i;        if (output_channels > 2 || input_channels > 2)        return NULL;    s = av_mallocz(sizeof(ReSampleContext));    if (!s)        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;    for(i=0;i<s->filter_channels;i++) {        init_mono_resample(&s->channel_ctx[i], s->ratio);    }    return s;}