This simplifies forward source compatibility when new fields are added to SEncParamExt - when new fields are added to SEncParamExt, this method makes sure those fields are initialized to the default value - otherwise all API users would have to manually check SEncParamExt every time it is updated to make sure there's no new fields that should be set to a nonzero value by default (e.g. like bEnableFrameSkip).
Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 5 files). Show all
Unified · Split
| @@ -197,6 +197,11 @@ void CWelsH264SVCEncoder::InitEncoder (void) { · 196 unmodified lines | |||
| 197 | 197 | ||
| 198 | /* Interfaces override from ISVCEncoder */ | 198 | /* Interfaces override from ISVCEncoder */ |
| 199 | 199 | ||
| 200 | int CWelsH264SVCEncoder::GetDefaultParams (SEncParamExt* argv) { | ||
| 201 | SWelsSvcCodingParam::FillDefault(*argv, true); | ||
| 202 | return cmResultSuccess; | ||
| 203 | } | ||
| 204 | |||
| 200 | /* | 205 | /* |
| 201 | * SVC Encoder Initialization | 206 | * SVC Encoder Initialization |
| 202 | */ | 207 | */ |