Fix tsan failures on filevideocapturer.cc.

1) init start_time_ns_ before the file_read_thread_ is started to avoid data racing as the start_time_ns_ will also be read by the file_read_thread_.
2) add CriticalSection to protect |finished_| that is accessed by FileReadThread and the main thread

Also remove the suppression for filemediaengine.cc, which has already been fixed in other cl.

TBR=henrike@webrtc.org
TEST=try bots and manual tsan v2 test
BUG=2078

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5018 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
wu@webrtc.org
2013-10-22 18:41:17 +00:00
parent 90d8719fd7
commit 4d7116be7a
2 changed files with 9 additions and 7 deletions

View File

@@ -15,11 +15,6 @@ race:webrtc/modules/audio_processing/aec/aec_rdft.c
# See https://code.google.com/p/webrtc/issues/detail?id=1205
race:talk/app/webrtc/test/fakeaudiocapturemodule.cc
# libjingle_media_unittest
# See https://code.google.com/p/webrtc/issues/detail?id=2078
race:talk/media/base/filemediaengine.cc
race:talk/media/devices/filevideocapturer.cc
# libjingle_p2p_unittest
# See https://code.google.com/p/webrtc/issues/detail?id=2079
race:talk/base/messagequeue.cc