[FFmpeg-devel] [RFC] rtpdec: Reordering RTP packets

Martin Storsjö martin
Sun May 16 21:41:35 CEST 2010


On Sun, 16 May 2010, Martin Storsj? wrote:

> On Sun, 16 May 2010, Ronald S. Bultje wrote:
> 
> > On May 16, 2010, at 4:23 AM, Martin Storsj? <martin at martin.st> wrote:
> > > On Sat, 15 May 2010, Ronald S. Bultje wrote:
> > >> On Sat, May 15, 2010 at 6:02 PM, Martin Storsj? <martin at martin.st> 
> > >>  wrote:
> > >>> Even if this isn't intentional, it may be beneficial for us to do  
> > >>> a little
> > >>> reordering of packets, if using UDP transport.
> > >>
> > >> Absolutely.
> > >>
> > >> I'll review the patch later, but this is a big FIXME (and has been  
> > >> for
> > >> a long while), so this is very welcome.
> > >
> > > This patch still is quite a hack, to test that this cured the problems
> > > with that particular video. This one always buffers a fixed number of
> > > packets before returning any data. Preferrably, we would buffer up  
> > > as many
> > > as needed, and if we suddenly have many consecutive packets, we would
> > > return the ones that are in order without trying to receive any more
> > > packets inbetween. That requires some new interface between rtpdec and
> > > rtsp, though.
> > 
> > Return 1 should be enough, with some smart code in rtpdec.c.
> 
> Yeah, I realized this a while after sending the last mail. :-)
> 
> > Also, logging on packet drops/skips would be useful.
> 
> Absolutely.

So, here's a more proper implementation of RTP packet reordering.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Split-out-the-part-of-rtp_parse_packet-that-does-the.patch
Type: text/x-diff
Size: 1866 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100516/145d1627/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Reorder-received-RTP-packets.patch
Type: text/x-diff
Size: 6758 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100516/145d1627/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Disable-reordering-if-using-TCP-interleaved-RTP.patch
Type: text/x-diff
Size: 1298 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100516/145d1627/attachment-0002.patch>



More information about the ffmpeg-devel mailing list