Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
for(out_i=0; out_i<out->ch_count; out_i++){
switch(s->matrix_ch[out_i][0]){
case 0:
- memset(out->ch[out_i], 0, len * (s->int_sample_fmt == AV_SAMPLE_FMT_FLT ? sizeof(float) : sizeof(int16_t)));
+ memset(out->ch[out_i], 0, len * av_get_bytes_per_sample(s->int_sample_fmt));
break;
case 1:
in_i= s->matrix_ch[out_i][1];
c->format= format;
+ c->felem_size= av_get_bytes_per_sample(c->format);
+
switch(c->format){
case AV_SAMPLE_FMT_S16:
- c->felem_size = 2;
c->filter_shift = 15;
break;
case AV_SAMPLE_FMT_S32:
- c->felem_size = 4;
c->filter_shift = 30;
break;
case AV_SAMPLE_FMT_FLT:
- c->felem_size = 4;
- c->filter_shift = 0;
- break;
case AV_SAMPLE_FMT_DBL:
- c->felem_size = 8;
c->filter_shift = 0;
break;
default: