Resample using libswresample.