Clear the FrameBuffer in case of a backward jump in the picture id.

Even though this is against the spec we allow a stream to continue if
a backwards jump in the picture id occurs on a keyframe.

BUG=webrtc:7001, webrtc:5514

Review-Url: https://codereview.webrtc.org/2640793003
Cr-Commit-Position: refs/heads/master@{#16146}
diff --git a/webrtc/modules/video_coding/frame_buffer2.h b/webrtc/modules/video_coding/frame_buffer2.h
index b41ef2f..f667fd5 100644
--- a/webrtc/modules/video_coding/frame_buffer2.h
+++ b/webrtc/modules/video_coding/frame_buffer2.h
@@ -143,6 +143,8 @@
 
   void UpdateHistograms() const;
 
+  void ClearFramesAndHistory() EXCLUSIVE_LOCKS_REQUIRED(crit_);
+
   FrameMap frames_ GUARDED_BY(crit_);
 
   rtc::CriticalSection crit_;
@@ -151,6 +153,7 @@
   VCMJitterEstimator* const jitter_estimator_ GUARDED_BY(crit_);
   VCMTiming* const timing_ GUARDED_BY(crit_);
   VCMInterFrameDelay inter_frame_delay_ GUARDED_BY(crit_);
+  uint32_t last_decoded_frame_timestamp_ GUARDED_BY(crit_);
   FrameMap::iterator last_decoded_frame_it_ GUARDED_BY(crit_);
   FrameMap::iterator last_continuous_frame_it_ GUARDED_BY(crit_);
   int num_frames_history_ GUARDED_BY(crit_);