Few fixes in audio resampling

- use av_opt_set_sample_fmt for fmt parameters
- revert to the old sample rate calculation algorithm