History

fix low memory crash issue

wayne committed 7 years ago

Commit d58148c1 parent 9a815399 files · +38 −24Browse files

Showing the changes to test/api/encode_decode_api_test.cpp (1 of 9 files). Show all

Unified · Split

test/api/encode_decode_api_test.cpp+2−1
@@ -34,7 +34,8 @@ bool EncodeDecodeTestBase::prepareEncDecParam (const EncodeDecodeFileParamBase E · 33 unmodified lines
3434 //for encoder
3535 //I420: 1(Y) + 1/4(U) + 1/4(V)
3636 int frameSize = EncDecFileParam.width * EncDecFileParam.height * 3 / 2;
37− buf_.SetLength (frameSize);
37+ if (-1 == buf_.SetLength(frameSize))
38+ return false;
3839 if (buf_.Length() != (size_t)frameSize) {
3940 printf ("buf_.Length() failed! frameSize = %d\n", frameSize);
4041 return false;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t