
HW encoder posts the encode callback to libjingle worker thread. It accesses MediaOptimization and is not protected by the critial section of VideoSender. Make MediaOptimization thread-safe to fix it. BUG=chromium:367691 TEST=Run apprtc loopback with SW or HW encoders. Run module_unittests. R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/12849004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6562 4adac7df-926f-26a2-2b94-8c16560cd09d