Bug 1162251: Fix WebRTC jitter buffer ignoring partial frames if the packet holds a complete NAL r=ehugg a=prep for uplift (kwierso)
authorRandell Jesup <rjesup@jesup.org>
Thu, 07 May 2015 20:05:20 -0400
changeset 274170 c50a3514dd867be190feb8e2cbc196781d3ecc18
parent 274169 5e02da1141d24cb2bd35e64df6bc9ee767fc9693
child 274171 356e735fa9082c54528cd8a77c2c7b413b7cd5cc
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehugg, prep
bugs1162251
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1162251: Fix WebRTC jitter buffer ignoring partial frames if the packet holds a complete NAL r=ehugg a=prep for uplift (kwierso)
media/webrtc/trunk/webrtc/modules/video_coding/main/source/jitter_buffer.cc
--- a/media/webrtc/trunk/webrtc/modules/video_coding/main/source/jitter_buffer.cc
+++ b/media/webrtc/trunk/webrtc/modules/video_coding/main/source/jitter_buffer.cc
@@ -638,24 +638,22 @@ VCMFrameBufferEnum VCMJitterBuffer::GetF
 
   // Handle the 2 1 3 4 case (where 2 3 4 are frame 2 with the timestamp)
   // from above, for complete nalu's (single-nalus) only.
 
   // TODO(jesup) To handle a sequence of fragmented nalus which all are
   // slices of the same lower-case frame (timestamp), the more complete
   // solution for FindFrame that uses the seqNum and can move packets
   // between sessions would be needed.
-  if (packet.completeNALU != kNaluComplete) {
-    *frame = incomplete_frames_.FindFrame(packet.seqNum, packet.timestamp);
-    if (*frame)
-      return kNoError;
-    *frame = decodable_frames_.FindFrame(packet.seqNum, packet.timestamp);
-    if (*frame && (*frame)->GetState() != kStateComplete)
-      return kNoError;
-  }
+  *frame = incomplete_frames_.FindFrame(packet.seqNum, packet.timestamp);
+  if (*frame)
+    return kNoError;
+  *frame = decodable_frames_.FindFrame(packet.seqNum, packet.timestamp);
+  if (*frame && (*frame)->GetState() != kStateComplete)
+    return kNoError;
 
   // No match, return empty frame.
   *frame = GetEmptyFrame();
   VCMFrameBufferEnum ret = kNoError;
   if (!*frame) {
     // No free frame! Try to reclaim some...
     LOG(LS_WARNING) << "Unable to get empty frame; Recycling.";
     bool found_key_frame = RecycleFramesUntilKeyFrame();