RTP: refactor a little bit and fix few minor bugs.

Change-Id: I063644507f26996ded462972afcb550a4528dac8
5 files changed