swresample/swresample: check for invalid sample rates