Fix no received audio in tests.

BUG=1582, 1581
Review URL: https://webrtc-codereview.appspot.com/1281005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3763 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pwestin@webrtc.org 2013-04-04 17:24:15 +00:00
parent aa527bbc91
commit 835dbf4516
2 changed files with 12 additions and 4 deletions

View File

@ -60,7 +60,12 @@ void VoiceChannelTransport::IncomingRTCPPacket(
}
int VoiceChannelTransport::SetLocalReceiver(WebRtc_UWord16 rtp_port) {
return socket_transport_->InitializeReceiveSockets(this, rtp_port);
int return_value = socket_transport_->InitializeReceiveSockets(this,
rtp_port);
if (return_value == 0) {
return socket_transport_->StartReceiving(kViENumReceiveSocketBuffers);
}
return return_value;
}
int VoiceChannelTransport::SetSendDestination(const char* ip_address,

View File

@ -325,14 +325,13 @@ void RunTest(std::string out_path) {
#endif
int channel_index = 0;
std::vector<int> channels(kMaxNumChannels);
std::vector<scoped_ptr<VoiceChannelTransport> > voice_channel_transports;
std::vector<VoiceChannelTransport*> voice_channel_transports(kMaxNumChannels);
for (i = 0; i < kMaxNumChannels; ++i) {
channels[i] = base1->CreateChannel();
int port = rPort + (i + 1) * 2;
voice_channel_transports[i].reset(
new VoiceChannelTransport(netw, channels[i]));
voice_channel_transports[i] = new VoiceChannelTransport(netw, channels[i]);
printf("Set Send IP \n");
res = voice_channel_transports[i]->SetSendDestination(ip, port);
@ -879,6 +878,10 @@ void RunTest(std::string out_path) {
newcall = (1 == i);
// Call loop
}
for (i = 0; i < kMaxNumChannels; ++i) {
delete voice_channel_transports[i];
voice_channel_transports[i] = NULL;
}
printf("Delete channels \n");
res = base1->DeleteChannel(chan);