add video format support verification

This commit is contained in:
ruil2 2014-03-03 09:03:59 +08:00
parent 823b3b6820
commit 23df8a9ff6

View File

@ -78,6 +78,10 @@ int32_t InitPic (const void* kpSrc, const int32_t kiColorspace, const int32_t ki
pSrcPic->iPicWidth = kiWidth; pSrcPic->iPicWidth = kiWidth;
pSrcPic->iPicHeight = kiHeight; pSrcPic->iPicHeight = kiHeight;
//currently encoder only supports videoFormatI420.
if((kiColorspace & (~videoFormatVFlip))!= videoFormatI420)
return 2;
switch (kiColorspace & (~videoFormatVFlip)) { switch (kiColorspace & (~videoFormatVFlip)) {
case videoFormatI420: case videoFormatI420:
case videoFormatYV12: case videoFormatYV12: