[Live-devel] Invalid packets with Vorbis RTP Sink

Gilles Chanteperdrix gilles.chanteperdrix at xenomai.org
Mon May 16 14:10:05 PDT 2016


On Mon, May 16, 2016 at 01:07:13PM -0700, Ross Finlayson wrote:
> > Recomputing the frame specific header offset as in the following
> > patch before reusing the overflow data seems to avoid the issue:
> > 
> > diff -Naurdp live/liveMedia/MultiFramedRTPSink.cpp live.fixed/liveMedia/MultiFramedRTPSink.cpp
> > --- live/liveMedia/MultiFramedRTPSink.cpp	2016-04-21 20:56:32.000000000 +0200
> > +++ live.fixed/liveMedia/MultiFramedRTPSink.cpp	2016-05-15 21:57:44.423448155 +0200
> > @@ -201,6 +201,10 @@ void MultiFramedRTPSink::buildAndSendPac
> > void MultiFramedRTPSink::packFrame() {
> >   // Get the next frame.
> > 
> > +  fCurFrameSpecificHeaderPosition = fOutBuf->curPacketSize();
> > +  fCurFrameSpecificHeaderSize = frameSpecificHeaderSize();
> > +  fOutBuf->skipBytes(fCurFrameSpecificHeaderSize);
> > +
> >   // First, see if we have an overflow frame that was too big for the last pkt
> >   if (fOutBuf->haveOverflowData()) {
> >     // Use this frame before reading a new one from the source
> > @@ -214,9 +218,6 @@ void MultiFramedRTPSink::packFrame() {
> >     // Normal case: we need to read a new frame from the source
> >     if (fSource == NULL) return;
> > 
> > -    fCurFrameSpecificHeaderPosition = fOutBuf->curPacketSize();
> > -    fCurFrameSpecificHeaderSize = frameSpecificHeaderSize();
> > -    fOutBuf->skipBytes(fCurFrameSpecificHeaderSize);
> >     fTotalFrameSpecificHeaderSizes += fCurFrameSpecificHeaderSize;
> 
> Gilles,
> 
> Thanks for the report.  (Actually, that last line "fTotalFrameSpecificHeaderSizes += fCurFrameSpecificHeaderSize;” also needs to be moved.)

I did not move that line because I thought that the frame specific
header size had already been accounted for by the same code before
the overflowing frame had been retrieved from the source.

-- 
					    Gilles.
https://click-hack.org


More information about the live-devel mailing list