video_coding: updates to jitter buffer logic: Make sure that every frame is inserted only once to the list.
Review URL: http://webrtc-codereview.appspot.com/165001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@648 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -1685,6 +1685,9 @@ VCMJitterBuffer::InsertPacket(VCMEncodedFrame* buffer, const VCMPacket& packet)
|
||||
}
|
||||
|
||||
// Insert packet
|
||||
// check for first packet
|
||||
// high sequence number will not be set
|
||||
bool first = frame->GetHighSeqNum() == -1;
|
||||
bufferReturn = frame->InsertPacket(packet, nowMs);
|
||||
ret = bufferReturn;
|
||||
|
||||
@@ -1700,8 +1703,7 @@ VCMJitterBuffer::InsertPacket(VCMEncodedFrame* buffer, const VCMPacket& packet)
|
||||
|
||||
// Insert each frame once on the arrival of the first packet
|
||||
// belonging to that frame (media or empty)
|
||||
if (state == kStateEmpty &&
|
||||
frame->GetHighSeqNum() == packet.seqNum)
|
||||
if (state == kStateEmpty && first)
|
||||
{
|
||||
ret = kFirstPacket;
|
||||
_frameBuffersTSOrder.Insert(frame);
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include <string.h>
|
||||
#include <cassert>
|
||||
|
||||
#include "internal_defines.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
VCMSessionInfo::VCMSessionInfo():
|
||||
@@ -52,11 +54,7 @@ VCMSessionInfo::GetLowSeqNum() const
|
||||
WebRtc_Word32
|
||||
VCMSessionInfo::GetHighSeqNum() const
|
||||
{
|
||||
if (_emptySeqNumHigh != -1)
|
||||
{
|
||||
return _emptySeqNumHigh;
|
||||
}
|
||||
return _highSeqNum;
|
||||
return VCM_MAX(_emptySeqNumHigh, _highSeqNum);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user