use av_opt_set_int instead of swr_alloc_set_opts
added option to use avresample instead of swresample (for libav)