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:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user