shithub: openh264

Download patch

ref: 0ef69e55e21bfe918a2d6f02584a41690285a0df
parent: 5921e5e7d3c947db3eb6a3e09e126faeb6ab56b7
author: Martin Storsjö <[email protected]>
date: Thu Mar 5 05:29:40 EST 2015

Set pfMeCost to NULL when it isn't initialized

This avoids using uninitialized data in the check for bSatdInMdFlag.

--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -2982,6 +2982,8 @@
       pFuncList->pfCalculateSatd = CalculateSatdCost;
       pFuncList->pfInterFineMd = WelsMdInterFinePartition;
     }
+  } else {
+    pFuncList->sSampleDealingFuncs.pfMeCost = NULL;
   }
 
   //to init at each frame will be needed when dealing with hybrid content (camera+screen)