History

add parameter checking on resolution and related UT

Sijia Chen committed 11 years ago

Commit 9442a7a1 parent 8b7af7c3 files · +136 −28Browse files

Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 3 files). Show all

Unified · Split

codec/encoder/plus/src/welsEncoderExt.cpp+21−21
@@ -934,29 +934,29 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 933 unmodified lines
934934 }
935935 break;
936936 case ENCODER_OPTION_ENABLE_SPS_PPS_ID_ADDITION: {
937− int32_t iValue = * (static_cast<int32_t*>(pOption));
937+ int32_t iValue = * (static_cast<int32_t*> (pOption));
938938 EParameterSetStrategy eNewStrategy = CONSTANT_ID;
939939 switch (iValue) {
940− case 0:
941− eNewStrategy = CONSTANT_ID;
942− break;
943− case 0x01:
944− eNewStrategy = INCREASING_ID;
945− break;
946− case 0x02:
947− eNewStrategy = SPS_LISTING;
948− break;
949− case 0x03:
950− eNewStrategy = SPS_LISTING_AND_PPS_INCREASING;
951− break;
952− case 0x06:
953− eNewStrategy = SPS_PPS_LISTING;
954− break;
955− default:
956− WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR,
957− " CWelsH264SVCEncoder::SetOption eSpsPpsIdStrategy(%d) not in valid range, unchanged! existing=%d",
958− iValue, m_pEncContext->pSvcParam->eSpsPpsIdStrategy);
959− break;
940+ case 0:
941+ eNewStrategy = CONSTANT_ID;
942+ break;
943+ case 0x01:
944+ eNewStrategy = INCREASING_ID;
945+ break;
946+ case 0x02:
947+ eNewStrategy = SPS_LISTING;
948+ break;
949+ case 0x03:
950+ eNewStrategy = SPS_LISTING_AND_PPS_INCREASING;
951+ break;
952+ case 0x06:
953+ eNewStrategy = SPS_PPS_LISTING;
954+ break;
955+ default:
956+ WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR,
957+ " CWelsH264SVCEncoder::SetOption eSpsPpsIdStrategy(%d) not in valid range, unchanged! existing=%d",
958+ iValue, m_pEncContext->pSvcParam->eSpsPpsIdStrategy);
959+ break;
960960 }
961961
962962 if (((eNewStrategy & SPS_LISTING) || (m_pEncContext->pSvcParam->eSpsPpsIdStrategy & SPS_LISTING))

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