We consider the dynamic pricing problem of perishable products in a system with a constant production rate. Potential demands arrive according to a compound Poisson process, and are price-sensitive. We carry out the sample path analysis of the inventory process and by using level-crossing method, we derive its stationary distribution given a pricing function. Based on the distribution, we express the average profit function. By a stochastic comparison approach, we characterize the pricing strategy given different customers willingness-to-pay functions. Finally, we provide an approximation algorithm to calculate the optimal pricing function.