Hi Ross, Thanks for your reply. Do you mean I just call scheduleDelayedTask if (fFrameSize > 0) as below ? Seems that it will block the live555 thread...
if (fFrameSize > 0) { // Set the 'presentation time': gettimeofday(&fPresentationTime, NULL); fDurationInMicroseconds = (mCurrentTimeStampUs - mLastTimeStampUs); nextTask() = envir().taskScheduler().scheduleDelayedTask(schedule_delayUs, (TaskFunc*)FramedSource::afterGetting, this); } return; Thanks. /Qian -----邮件原件----- 发件人: live-devel [mailto:live-devel-boun...@us.live555.com] 代表 Ross Finlayson 发送时间: 2019年9月24日 11:34 收件人: LIVE555 Streaming Media - development & use 主题: Re: [Live-devel] empty payload data will be sent in MultiFramedRTPSink > On Sep 23, 2019, at 7:36 PM, Zhang Qian(张倩) <qianzh...@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/ _______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel _______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel