resample_template: use av_assert