Potential dead lock in receive statistics

A dead lock could occur if the following to code paths are called
concurrently:

ReceiveStatisticsImpl::IncomingPacket() ->
  StreamStatisticianImpl::IncomingPacket()

StreamStatisticianImpl::GetStatistics() ->
  ReceiveStatisticsImpl::StatisticsUpdated()

Solution is to release ReceiveStatisticsImpl lock after lookup/lazy-init of StreamStatisticianImpl. Don't need to hold it when doing the call to StreamStatisticianImpl::IncomingPacket().

BUG=2818
R=asapersson@webrtc.org, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5406 4adac7df-926f-26a2-2b94-8c16560cd09d
2 files changed