Index: webrtc/modules/video_coding/rtp_frame_reference_finder.cc |
diff --git a/webrtc/modules/video_coding/rtp_frame_reference_finder.cc b/webrtc/modules/video_coding/rtp_frame_reference_finder.cc |
index 5926c524bea672302d3dff22d661472570abf38d..b0999cc0e97f8f2d0273e29c07a90540c432c02e 100644 |
--- a/webrtc/modules/video_coding/rtp_frame_reference_finder.cc |
+++ b/webrtc/modules/video_coding/rtp_frame_reference_finder.cc |
@@ -676,11 +676,14 @@ bool RtpFrameReferenceFinder::Vp9PidTl0Fix(const RtpFrameObject& frame, |
vp9_fix_jump_timestamp_ = frame.timestamp; |
gof_info_.clear(); |
- vp9_fix_tl0_pic_idx_offset_ = |
- ForwardDiff<uint8_t>(*tl0_pic_idx, vp9_fix_last_tl0_pic_idx_); |
- vp9_fix_tl0_pic_idx_offset_ += kMaxGofSaved; |
- fixed_tl0 = Add<kTl0PicIdLength>(*tl0_pic_idx, vp9_fix_tl0_pic_idx_offset_); |
- vp9_fix_last_tl0_pic_idx_ = fixed_tl0; |
+ if (fixed_tl0 != kNoTl0PicIdx) { |
+ vp9_fix_tl0_pic_idx_offset_ = |
+ ForwardDiff<uint8_t>(*tl0_pic_idx, vp9_fix_last_tl0_pic_idx_); |
+ vp9_fix_tl0_pic_idx_offset_ += kMaxGofSaved; |
+ fixed_tl0 = |
+ Add<kTl0PicIdLength>(*tl0_pic_idx, vp9_fix_tl0_pic_idx_offset_); |
+ vp9_fix_last_tl0_pic_idx_ = fixed_tl0; |
+ } |
} |
// Update |vp9_fix_last_picture_id_| with the most recent picture id. |