swresample/resample_template: try to consider src_size more exactly