live555直播h264異常優化:
MultiFramedRTPSink::afterGettingFrame1(): The input frame data was too large for our buffer size (61140). 21339 bytes of trailing data was dropped! Correct this by increasing "OutPacketBuffer::maxSize" to at least 81339, *before* creating this 'RTPSink'. (Current value is 60000.)
優化:
- 在“live/liveMedia/StreamParser.cpp”中擴展幀解析buffer大小,即BANK_SIZE,默認值爲150k,根據傳輸的H264數據幀大小,至少設置爲300k。否則超出大小,可能會被Live555拋棄。
- 在“live/liveMedia/MediaSink.cpp”中增加OutPacketBuffer::maxSize大小,同樣爲了容納超大幀數據,否則可能會導致數據丟失,設置爲 600000。
- 在“live/liveMedia/MultiFramedRTPsource.cpp”中,增加socket發送緩衝區大小,即increaseSendBufferTo函數的參數值--increaseRecieveBufferTo(env, RTPgs-> socketNUm(), 2000000)”