[FFmpeg-devel] [PATCH] RTP depacketizer for AMR

Martin Storsjö martin
Wed Jan 27 15:51:35 CET 2010


On Wed, 27 Jan 2010, Luca Abeni wrote:

> The only thing that looks debatable is the fact that the payload parser
> touches the timestamp. I believe the timestamp should only be modified
> by rtpdec.c::rtp_parse_packet() (in other word, the first frame of the
> RTP packet is assigned the RTP timestamp, the other frames get
> AV_NOPTS_VALUE). I think libavformat can correctly fill the missing
> timestamps... Can you try it and see what happens?

It seems to me that the missing timestamps aren't filled in automatically 
by libavformat. Around lines 421-424 in rtpdec.c, the timestamp is set to 
0 unless the dynamic parser sets something else, and this is used as a 
normal RTP timestamp in the calculation in finalize_packet, so as far as I 
can see, the only correct thing to do is to fill it in in the dynamic 
handler as I do now.

> I also am not sure if it is worth introducing a new header
> (rtpdec_amr.h) just for two "extern" declarations... Maybe they
> can be moved to rtpdec.h?

Yes, that'd be ok for me too. This was the way things were done for all 
other RTP depacketizers, too, such as rtp_h264.h, so I tried to follow 
their style.

// Martin



More information about the ffmpeg-devel mailing list