shithub: openh264

Download patch

ref: 4d494cb0f195e5db0df39a1f5ef353630365a2db
parent: bdf9f6b4ffb61dbe87690f3de0bd12312de1bf34
author: Martin Storsjö <[email protected]>
date: Wed Jul 2 07:30:19 EDT 2014

Use GetDefaultParams instead of memset to initialize SEncParamExt in the console test app

Most of the default parameters still are overwritten with hardcoded
values in FillSpecificParameters though, but this makes sure that
defaults are applied for any new fields at least.

--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -204,8 +204,6 @@
   int32_t iRet = 0;
   int8_t iLayerCount = 0;
 
-//	memset(&pSvcParam, 0, sizeof(WelsSVCParamConfig));
-
   while (!cRdCfg.EndOfFile()) {
     long iRd = cRdCfg.ReadLine (&strTag[0]);
     if (iRd > 0) {
@@ -669,7 +667,7 @@
   int iParsedNum = 1;
 
   memset (&sFbi, 0, sizeof (SFrameBSInfo));
-  memset (&sSvcParam, 0, sizeof (SEncParamExt));
+  pPtrEnc->GetDefaultParams(&sSvcParam);
   memset (&fs.sRecFileName[0][0], 0, sizeof (fs.sRecFileName));
 
   FillSpecificParameters (sSvcParam);