[FFmpeg-devel] WunderRadio changes

Martin Storsjö martin
Mon Aug 23 17:23:35 CEST 2010


On Mon, 23 Aug 2010, Ronald S. Bultje wrote:

> On Mon, Aug 23, 2010 at 9:50 AM, Martin Storsj? <martin at martin.st> wrote:
> > On Mon, 23 Aug 2010, Diego Biurrun wrote:
> >
> >> I just had a 5 minute look, so I don't know any details, but there
> >> are some changes in there that we might wish to pick up: RTSP stuff
> >> and some ARM libswscale improvements.
> >
> > A quick check of their RTSP changes:
> > - Hardcoded to use TCP as lower transport
> > - Send keep-alive OPTIONS regularly (which we added in trunk a few weeks
> > ago)
> > - Require TCP-interleaved RTP packets to be at least 11 bytes, instead of
> > 12. (A minimal RTP packet is 12 bytes, but a minimal RTCP packet can be
> > much smaller, at least as small as 8 bytes.) This could be adjusted with
> > something like this:
> >
> > diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
> > index 36fe753..8c4c29b 100644
> > --- a/libavformat/rtsp.c
> > +++ b/libavformat/rtsp.c
> > @@ -1735,7 +1735,7 @@ redo:
> > ?#ifdef DEBUG_RTP_TCP
> > ? ? dprintf(s, "id=%d len=%d\n", id, len);
> > ?#endif
> > - ? ?if (len > buf_size || len < 12)
> > + ? ?if (len > buf_size || len < 8)
> > ? ? ? ? goto redo;
> > ? ? /* get the data */
> > ? ? ret = url_read_complete(rt->rtsp_hd, buf, len);
> >
> >
> > Luca B, Ronald, any opinions on adjusting this?
> 
> Only if we actually do something with the RTCP packet. Otherwise
> ignoring is better.

We do pass the packet on to the rtpdec code, that may or may not react to 
it (e.g. RTCP BYE support). If we "ignore" small packets this way, the 
payload data of the packets are left unread and will show up as garbage 
before receiving the next packet, I'm not sure how tolerant the code 
currently is against such cases. Adjusting this limit down would avoid 
such cases, at least for valid inputs.

// Martin



More information about the ffmpeg-devel mailing list