Index: webrtc/modules/video_coding/generic_encoder.cc |
diff --git a/webrtc/modules/video_coding/generic_encoder.cc b/webrtc/modules/video_coding/generic_encoder.cc |
index 4c2a69964a5d17edeb769adcc5db560373a9c318..78eeef288a2e7046c00adc934d438769ab9177a3 100644 |
--- a/webrtc/modules/video_coding/generic_encoder.cc |
+++ b/webrtc/modules/video_coding/generic_encoder.cc |
@@ -231,7 +231,7 @@ |
rtc::Optional<size_t> outlier_frame_size; |
rtc::Optional<int64_t> encode_start_ms; |
- uint8_t timing_flags = TimingFrameFlags::kInvalid; |
+ bool is_timing_frame = false; |
{ |
rtc::CritScope crit(&timing_params_lock_); |
@@ -274,16 +274,14 @@ |
if (last_timing_frame_time_ms_ == -1 || |
timing_frame_delay_ms >= timing_frames_thresholds_.delay_ms || |
timing_frame_delay_ms == 0) { |
- timing_flags = TimingFrameFlags::kTriggeredByTimer; |
+ is_timing_frame = true; |
last_timing_frame_time_ms_ = encoded_image.capture_time_ms_; |
} |
// Outliers trigger timing frames, but do not affect scheduled timing |
// frames. |
if (outlier_frame_size && encoded_image._length >= *outlier_frame_size) { |
- if (timing_flags == TimingFrameFlags::kInvalid) |
- timing_flags = 0; |
- timing_flags |= TimingFrameFlags::kTriggeredBySize; |
+ is_timing_frame = true; |
} |
} |
@@ -292,10 +290,9 @@ |
// drift relative to rtc::TimeMillis(). We can't use it for Timing frames, |
// because to being sent in the network capture time required to be less than |
// all the other timestamps. |
- if (timing_flags != TimingFrameFlags::kInvalid && encode_start_ms) { |
+ if (is_timing_frame && encode_start_ms) { |
encoded_image.SetEncodeTime(*encode_start_ms, rtc::TimeMillis()); |
} |
- encoded_image.timing_.flags = timing_flags; |
Result result = post_encode_callback_->OnEncodedImage( |
encoded_image, codec_specific, fragmentation_header); |