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

Ronald S. Bultje rsbultje
Wed Jan 27 21:15:30 CET 2010

Hi Martin,

On Wed, Jan 27, 2010 at 3:08 PM, Martin Storsj? <martin at martin.st> wrote:
> Also, another point that came to my mind regarding splitting in the
> depacketizer vs in a parser: AMR/RTP does allow interleaving (which I
> don't support yet, haven't run across any samples with that). In this
> case, the first RTP packet may contain audio frames 1, 4, 7, the second
> packet contains frames 2, 5, 8, etc.
> In this case, I don't see any other option than buffering this within the
> depacketizer and then returning the individual frames in the correct
> order. Or is there another solution to that case?

It is exactly for this that the return values are intended. Also, for
something like RDT, the demuxer itself might "parse" already. If you
can return full frames, it is generally more memory-efficient (b/c you
need fewer memcpy()s), and then that's better, IMO.


More information about the ffmpeg-devel mailing list