Removed a segmentation fault error when processing near_file only.
Review URL: http://webrtc-codereview.appspot.com/174001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@650 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
961885a8bb
commit
a2c6ea09b0
@ -482,13 +482,6 @@ void void_main(int argc, char* argv[]) {
|
|||||||
<< aecm_echo_path_out_filename;
|
<< aecm_echo_path_out_filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Events {
|
|
||||||
kInitializeEvent,
|
|
||||||
kRenderEvent,
|
|
||||||
kCaptureEvent,
|
|
||||||
kResetEventDeprecated
|
|
||||||
};
|
|
||||||
int16_t event = 0;
|
|
||||||
size_t read_count = 0;
|
size_t read_count = 0;
|
||||||
int reverse_count = 0;
|
int reverse_count = 0;
|
||||||
int primary_count = 0;
|
int primary_count = 0;
|
||||||
@ -666,6 +659,13 @@ void void_main(int argc, char* argv[]) {
|
|||||||
ASSERT_TRUE(feof(pb_file));
|
ASSERT_TRUE(feof(pb_file));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
enum Events {
|
||||||
|
kInitializeEvent,
|
||||||
|
kRenderEvent,
|
||||||
|
kCaptureEvent,
|
||||||
|
kResetEventDeprecated
|
||||||
|
};
|
||||||
|
int16_t event = 0;
|
||||||
while (simulating || feof(event_file) == 0) {
|
while (simulating || feof(event_file) == 0) {
|
||||||
std::ostringstream trace_stream;
|
std::ostringstream trace_stream;
|
||||||
trace_stream << "Processed frames: " << reverse_count << " (reverse), "
|
trace_stream << "Processed frames: " << reverse_count << " (reverse), "
|
||||||
@ -778,10 +778,6 @@ void void_main(int argc, char* argv[]) {
|
|||||||
}
|
}
|
||||||
if (simulating) {
|
if (simulating) {
|
||||||
if (read_count != near_frame._payloadDataLengthInSamples) {
|
if (read_count != near_frame._payloadDataLengthInSamples) {
|
||||||
// Read an equal amount from the far file to avoid errors due to
|
|
||||||
// not reaching end-of-file.
|
|
||||||
EXPECT_EQ(0, fseek(far_file, read_count * sizeof(WebRtc_Word16),
|
|
||||||
SEEK_CUR));
|
|
||||||
break; // This is expected.
|
break; // This is expected.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user