[Live-devel] empty payload data will be sent in MultiFramedRTPSink

Ross Finlayson finlayson at live555.com
Mon Sep 23 20:34:07 PDT 2019



> On Sep 23, 2019, at 7:36 PM, Zhang Qian(张倩) <qianzhang at asrmicro.com> wrote:
> 
>  
> Hi Ross,
>  
> I found it will send RTP packet with empty payload data in function MultiFramedRTPSink::afterGettingFrame1 if frameSize is 0.

That is correct.  These are valid RTP packets; just with no payload.


> How can I avoid this issue?

Don’t set “fFrameSize” to 0.

In other words, in your server code (e.g., in your implementation of “doGetNextFrame()” for your “FramedSource” subclass) don’t call “FramedSource::afterGetting()” unless/until you actually have a (non-zero-length) frame to deliver.  If “doGetNextFrame()”gets called when no frame is currently available to be delivered, then you must simply return, without calling “FramedSource::afterGetting()”.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list