Bug 1632489 - Only adjust valid capture times when generating padding; r=bwc

The current code will only set the TranmissionOffset extension if
capture_time_ms is > 0, but when adjusting timestamps for rtx packets, it is
adjusted  without first checking to see if it is valid, which will cause invalid
values of capture_time_ms to be written to TranmissionOffset, leading to assertion
failures.

This bug is still present on tip of libwebrtc, so we'll also need to prepare a
patch for upstream.

Depends on D74842

Differential Revision: https://phabricator.services.mozilla.com/D75528
This commit is contained in:
Dan Minor 2020-05-15 14:47:36 +00:00
Родитель a9aa42a49c
Коммит b9598227dc
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -568,7 +568,9 @@ size_t RTPSender::SendPadData(size_t bytes,
if (last_timestamp_time_ms_ > 0) {
timestamp +=
(now_ms - last_timestamp_time_ms_) * kTimestampTicksPerMs;
capture_time_ms += (now_ms - last_timestamp_time_ms_);
if (capture_time_ms > 0) {
capture_time_ms += (now_ms - last_timestamp_time_ms_);
}
}
if (!ssrc_rtx_) {
RTC_LOG(LS_ERROR) << "RTX SSRC unset.";