Delete capturers after destroying streams in test.

Since the renderers in CallTest.SendsAndReceiveStreams also stopped the
capturers they must be deleted after the VideoReceiveStream is stopped
or an use-after-free may occur.

R=mflodman@webrtc.org
BUG=

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5300 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2013-12-16 14:55:54 +00:00
parent e7b1e11283
commit 919f87fb36

View File

@ -853,9 +853,9 @@ TEST_F(CallTest, SendsAndReceivesMultipleStreams) {
for (size_t i = 0; i < kNumStreams; ++i) {
frame_generators[i]->Stop();
delete frame_generators[i];
sender_call->DestroyVideoSendStream(send_streams[i]);
receiver_call->DestroyVideoReceiveStream(receive_streams[i]);
delete frame_generators[i];
delete observers[i];
}