I know there is a solution to this pde

$$\partial_{t} f(t,x)=  \partial_{x}(v(x)f(t,x))$$
$$ f(0,x)=g(x)$$
( Where $v$ and $g$ are known functions) 
which is given by 
$$ f(t,x)=\frac{1}{v(x)} h(t+\int \frac{1}{v(x)})$$ 
where $h(x)$ is determined by initial condition $g(x)$.

The question is if I use the method of characteristic would it give me the same solution with this initial condition?