pRevert 5371 "Revert 5367 "Update talk to 59410372.""

> Revert 5367 "Update talk to 59410372."
> 
> > Update talk to 59410372.
> > 
> > R=jiayl@webrtc.org, wu@webrtc.org
> > 
> > Review URL: https://webrtc-codereview.appspot.com/6929004
> 
> TBR=mallinath@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/6999004

TBR=henrika@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/7109004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5381 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/media/base/fakevideorenderer.h b/talk/media/base/fakevideorenderer.h
index 362e592..cab77dd 100644
--- a/talk/media/base/fakevideorenderer.h
+++ b/talk/media/base/fakevideorenderer.h
@@ -48,6 +48,7 @@
   }
 
   virtual bool SetSize(int width, int height, int reserved) {
+    talk_base::CritScope cs(&crit_);
     width_ = width;
     height_ = height;
     ++num_set_sizes_;
@@ -56,6 +57,7 @@
   }
 
   virtual bool RenderFrame(const VideoFrame* frame) {
+    talk_base::CritScope cs(&crit_);
     // TODO(zhurunz) Check with VP8 team to see if we can remove this
     // tolerance on Y values.
     black_frame_ = CheckFrameColorYuv(6, 48, 128, 128, 128, 128, frame);
@@ -79,11 +81,26 @@
   }
 
   int errors() const { return errors_; }
-  int width() const { return width_; }
-  int height() const { return height_; }
-  int num_set_sizes() const { return num_set_sizes_; }
-  int num_rendered_frames() const { return num_rendered_frames_; }
-  bool black_frame() const { return black_frame_; }
+  int width() const {
+    talk_base::CritScope cs(&crit_);
+    return width_;
+  }
+  int height() const {
+    talk_base::CritScope cs(&crit_);
+    return height_;
+  }
+  int num_set_sizes() const {
+    talk_base::CritScope cs(&crit_);
+    return num_set_sizes_;
+  }
+  int num_rendered_frames() const {
+    talk_base::CritScope cs(&crit_);
+    return num_rendered_frames_;
+  }
+  bool black_frame() const {
+    talk_base::CritScope cs(&crit_);
+    return black_frame_;
+  }
 
   sigslot::signal3<int, int, int> SignalSetSize;
   sigslot::signal1<const VideoFrame*> SignalRenderFrame;
@@ -143,6 +160,7 @@
   int num_set_sizes_;
   int num_rendered_frames_;
   bool black_frame_;
+  mutable talk_base::CriticalSection crit_;
 };
 
 }  // namespace cricket