@@ -77,21 +77,8 @@ RtpVp9RefFinder::FrameDecision RtpVp9RefFinder::ManageFrameInternal(
77
77
}
78
78
79
79
GofInfo* info;
80
-
81
- // The VP9 `tl0_pic_idx` is 8 bits and therefor wraps often. In the case of
82
- // packet loss the next received frame could have a `tl0_pic_idx` that looks
83
- // older than the previously received frame. Always wrap forward if `frame` is
84
- // newer in RTP packet sequence number order.
85
- int64_t unwrapped_tl0;
86
- auto tl0_it = gof_info_.rbegin ();
87
- if (tl0_it != gof_info_.rend () &&
88
- AheadOf (frame->last_seq_num (), tl0_it->second .last_seq_num )) {
89
- unwrapped_tl0 =
90
- tl0_unwrapper_.UnwrapForward (codec_header.tl0_pic_idx & 0xFF );
91
- } else {
92
- unwrapped_tl0 = tl0_unwrapper_.Unwrap (codec_header.tl0_pic_idx & 0xFF );
93
- }
94
-
80
+ int64_t unwrapped_tl0 =
81
+ tl0_unwrapper_.Unwrap (codec_header.tl0_pic_idx & 0xFF );
95
82
if (codec_header.ss_data_available ) {
96
83
if (codec_header.temporal_idx != 0 ) {
97
84
RTC_LOG (LS_WARNING) << " Received scalability structure on a non base "
@@ -117,9 +104,9 @@ RtpVp9RefFinder::FrameDecision RtpVp9RefFinder::ManageFrameInternal(
117
104
current_ss_idx_ = Add<kMaxGofSaved >(current_ss_idx_, 1 );
118
105
scalability_structures_[current_ss_idx_] = gof;
119
106
scalability_structures_[current_ss_idx_].pid_start = frame->Id ();
120
- gof_info_.emplace (unwrapped_tl0,
121
- GofInfo (&scalability_structures_[current_ss_idx_] ,
122
- frame-> Id () , frame->last_seq_num ()));
107
+ gof_info_.emplace (
108
+ unwrapped_tl0 ,
109
+ GofInfo (&scalability_structures_[current_ss_idx_] , frame->Id ()));
123
110
}
124
111
125
112
const auto gof_info_it = gof_info_.find (unwrapped_tl0);
@@ -160,8 +147,7 @@ RtpVp9RefFinder::FrameDecision RtpVp9RefFinder::ManageFrameInternal(
160
147
if (codec_header.temporal_idx == 0 ) {
161
148
gof_info_it = gof_info_
162
149
.emplace (unwrapped_tl0,
163
- GofInfo (gof_info_it->second .gof , frame->Id (),
164
- frame->last_seq_num ()))
150
+ GofInfo (gof_info_it->second .gof , frame->Id ()))
165
151
.first ;
166
152
}
167
153
0 commit comments