Index: webrtc/api/androidvideocapturer.cc |
diff --git a/webrtc/api/androidvideocapturer.cc b/webrtc/api/androidvideocapturer.cc |
index db942898383a3353d4523f2bec12117644137a10..a24d55c168e03f1fded01d02224babf7879508e6 100644 |
--- a/webrtc/api/androidvideocapturer.cc |
+++ b/webrtc/api/androidvideocapturer.cc |
@@ -152,7 +152,7 @@ |
delegate_->Stop(); |
current_state_ = cricket::CS_STOPPED; |
- SetCaptureState(current_state_); |
+ SignalStateChange(this, current_state_); |
} |
bool AndroidVideoCapturer::IsRunning() { |
@@ -173,7 +173,11 @@ |
if (new_state == current_state_) |
return; |
current_state_ = new_state; |
- SetCaptureState(new_state); |
+ |
+ // TODO(perkj): SetCaptureState can not be used since it posts to |thread_|. |
+ // But |thread_ | is currently just the thread that happened to create the |
+ // cricket::VideoCapturer. |
+ SignalStateChange(this, new_state); |
} |
void AndroidVideoCapturer::OnIncomingFrame( |