Fix low-latency renderer with unset playout delays
The low-latency renderer is activated by the RTP header extension playout-delay if the min value is set to 0 and the max value is set to something greater than 0. According to the specification of the playout-delay header extension it doesn't have to be set for every frame but only if it is changed. The bug that this CL fixes occured if a playout delay had been set previously but some frames without any specified playout-delay were received. In this case max composition delay would not be set and the low-latency renderer algorithm would be disabled for the rest of the session. Bug: chromium:1138888 Change-Id: I12d10715fd5ec29f6ee78296ddfe975d7edab8a9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208581 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Johannes Kron <kron@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33330}
This commit is contained in:

committed by
Commit Bot

parent
198299c161
commit
0093a38f7c
@ -110,8 +110,7 @@ void VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
|
||||
decodedImage.set_packet_infos(frameInfo->packet_infos);
|
||||
decodedImage.set_rotation(frameInfo->rotation);
|
||||
|
||||
if (low_latency_renderer_enabled_ && frameInfo->playout_delay.min_ms == 0 &&
|
||||
frameInfo->playout_delay.max_ms > 0) {
|
||||
if (low_latency_renderer_enabled_) {
|
||||
absl::optional<int> max_composition_delay_in_frames =
|
||||
_timing->MaxCompositionDelayInFrames();
|
||||
if (max_composition_delay_in_frames) {
|
||||
@ -253,7 +252,6 @@ int32_t VCMGenericDecoder::Decode(const VCMEncodedFrame& frame, Timestamp now) {
|
||||
_frameInfos[_nextFrameInfoIdx].decodeStart = now;
|
||||
_frameInfos[_nextFrameInfoIdx].renderTimeMs = frame.RenderTimeMs();
|
||||
_frameInfos[_nextFrameInfoIdx].rotation = frame.rotation();
|
||||
_frameInfos[_nextFrameInfoIdx].playout_delay = frame.PlayoutDelay();
|
||||
_frameInfos[_nextFrameInfoIdx].timing = frame.video_timing();
|
||||
_frameInfos[_nextFrameInfoIdx].ntp_time_ms =
|
||||
frame.EncodedImage().ntp_time_ms_;
|
||||
|
@ -35,7 +35,6 @@ struct VCMFrameInformation {
|
||||
void* userData;
|
||||
VideoRotation rotation;
|
||||
VideoContentType content_type;
|
||||
PlayoutDelay playout_delay;
|
||||
EncodedImage::Timing timing;
|
||||
int64_t ntp_time_ms;
|
||||
RtpPacketInfos packet_infos;
|
||||
|
Reference in New Issue
Block a user