Return nullptr instead of crashing in NetEqTestFactory

Currently the code in NetEqTestFactory will crash when something
unexpected happens. It would be better to return a nullptr instead and
let the caller decide how to proceed.

Bug: webrtc:10337
Change-Id: I3cfdffa7e6f2016eeaa5d6e80c5dd6c954ef8485
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127894
Reviewed-by: Pablo Barrera González <barrerap@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27226}
This commit is contained in:
Ivo Creusen
2019-03-20 18:01:51 +01:00
committed by Commit Bot
parent 94b57c044e
commit ab9735f6ca
2 changed files with 27 additions and 10 deletions

View File

@ -379,6 +379,7 @@ int main(int argc, char* argv[]) {
std::unique_ptr<webrtc::test::NetEqTest> test =
factory.InitializeTestFromFile(/*input_filename=*/argv[1], config);
RTC_CHECK(test) << "ERROR: Unable to run test";
test->Run();
return 0;
}