VideoStreamEncoder: remove an unneeded and potentially dangerous PostTask.
Bug: None
Change-Id: I9423a78787db09469faa31646e97ac8904a2b32a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327782
Reviewed-by: Ilya Nikolaevskiy <ilnik@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41224}
diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc
index 2e5a120..c5929ef 100644
--- a/video/video_stream_encoder.cc
+++ b/video/video_stream_encoder.cc
@@ -1538,11 +1538,8 @@
<< incoming_frame.ntp_time_ms()
<< " <= " << last_captured_timestamp_
<< ") for incoming frame. Dropping.";
- encoder_queue_.PostTask([this, incoming_frame]() {
- RTC_DCHECK_RUN_ON(&encoder_queue_);
- accumulated_update_rect_.Union(incoming_frame.update_rect());
- accumulated_update_rect_is_valid_ &= incoming_frame.has_update_rect();
- });
+ accumulated_update_rect_.Union(incoming_frame.update_rect());
+ accumulated_update_rect_is_valid_ &= incoming_frame.has_update_rect();
return;
}