summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/moz-patch-stack/0085.patch
blob: aa8d5a9501317ad6336d44f4329cb8f0bab0afcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From: Byron Campen <docfaraday@gmail.com>
Date: Thu, 20 Jul 2023 14:24:00 +0000
Subject: Bug 1838080: Use the current TaskQueue, instead of the current
 thread, to init this. r=pehrsons,webrtc-reviewers

There are situations where the current thread is not set, but the current
TaskQueue is (but not vice versa).

Differential Revision: https://phabricator.services.mozilla.com/D180736
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/62e71a2f745c4b98d5ee7ce9e6386aa1b657be9b
---
 .../rtp_video_stream_receiver_frame_transformer_delegate.cc  | 3 +--
 .../rtp_video_stream_receiver_frame_transformer_delegate.h   | 5 ++---
 video/rtp_video_stream_receiver2.cc                          | 2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/modules/rtp_rtcp/source/rtp_video_stream_receiver_frame_transformer_delegate.cc b/modules/rtp_rtcp/source/rtp_video_stream_receiver_frame_transformer_delegate.cc
index fbd10c4c7b..ad3aa86c79 100644
--- a/modules/rtp_rtcp/source/rtp_video_stream_receiver_frame_transformer_delegate.cc
+++ b/modules/rtp_rtcp/source/rtp_video_stream_receiver_frame_transformer_delegate.cc
@@ -96,8 +96,7 @@ RtpVideoStreamReceiverFrameTransformerDelegate::
         RtpVideoFrameReceiver* receiver,
         Clock* clock,
         rtc::scoped_refptr<FrameTransformerInterface> frame_transformer,
-        rtc::Thread* network_thread,
-        uint32_t ssrc)
+        TaskQueueBase* network_thread, uint32_t ssrc)
     : receiver_(receiver),
       frame_transformer_(std::move(frame_transformer)),
       network_thread_(network_thread),
diff --git a/modules/rtp_rtcp/source/rtp_video_stream_receiver_frame_transformer_delegate.h b/modules/rtp_rtcp/source/rtp_video_stream_receiver_frame_transformer_delegate.h
index f08fc692dd..02f2e53923 100644
--- a/modules/rtp_rtcp/source/rtp_video_stream_receiver_frame_transformer_delegate.h
+++ b/modules/rtp_rtcp/source/rtp_video_stream_receiver_frame_transformer_delegate.h
@@ -41,8 +41,7 @@ class RtpVideoStreamReceiverFrameTransformerDelegate
       RtpVideoFrameReceiver* receiver,
       Clock* clock,
       rtc::scoped_refptr<FrameTransformerInterface> frame_transformer,
-      rtc::Thread* network_thread,
-      uint32_t ssrc);
+      TaskQueueBase* network_thread, uint32_t ssrc);
 
   void Init();
   void Reset();
@@ -71,7 +70,7 @@ class RtpVideoStreamReceiverFrameTransformerDelegate
   RtpVideoFrameReceiver* receiver_ RTC_GUARDED_BY(network_sequence_checker_);
   rtc::scoped_refptr<FrameTransformerInterface> frame_transformer_
       RTC_GUARDED_BY(network_sequence_checker_);
-  rtc::Thread* const network_thread_;
+  TaskQueueBase* const network_thread_;
   const uint32_t ssrc_;
   Clock* const clock_;
   bool short_circuit_ RTC_GUARDED_BY(network_sequence_checker_) = false;
diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc
index d13e4448b4..ae78ef8eef 100644
--- a/video/rtp_video_stream_receiver2.cc
+++ b/video/rtp_video_stream_receiver2.cc
@@ -345,7 +345,7 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2(
   if (frame_transformer) {
     frame_transformer_delegate_ =
         rtc::make_ref_counted<RtpVideoStreamReceiverFrameTransformerDelegate>(
-            this, clock_, std::move(frame_transformer), rtc::Thread::Current(),
+            this, clock_, std::move(frame_transformer), TaskQueueBase::Current(),
             config_.rtp.remote_ssrc);
     frame_transformer_delegate_->Init();
   }