History

Merge pull request #371 from ruil2/encode_ret

add verification on return value -- review request #128

volvet committed 12 years ago

Commit e3bf5ce2 parents aa043fa abdeb192 files · +25 −4Browse files

Showing the changes to codec/encoder/core/src/encoder.cpp (1 of 2 files). Show all

Unified · Split

codec/encoder/core/src/encoder.cpp+3−0
@@ -78,6 +78,9 @@ int32_t InitPic (const void* kpSrc, const int32_t kiColorspace, const int32_t ki · 77 unmodified lines
7878 pSrcPic->iPicWidth = kiWidth;
7979 pSrcPic->iPicHeight = kiHeight;
8080
81+ //currently encoder only supports videoFormatI420.
82+ if((kiColorspace & (~videoFormatVFlip))!= videoFormatI420)
83+ return 2;
8184 switch (kiColorspace & (~videoFormatVFlip)) {
8285 case videoFormatI420:
8386 case videoFormatYV12:

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