shithub: openh264

Download patch

ref: d1341554ddb40de6b7a9893d9532ea64eb6ff56a
parent: 325dd1ce32a59db6bd3f29c8b2003a6015c576c8
author: Martin Storsjö <[email protected]>
date: Fri Jan 24 08:59:54 EST 2014

Remove an unnecessary cast when setting function pointers

By removing the casts we make sure that the function signature
actually matches and isn't silenced by the cast.

--- a/codec/encoder/core/src/encoder.cpp
+++ b/codec/encoder/core/src/encoder.cpp
@@ -150,11 +150,11 @@
 
 void WelsInitBGDFunc (SWelsFuncPtrList* pFuncList, const bool_t kbEnableBackgroundDetection) {
   if (kbEnableBackgroundDetection) {
-    pFuncList->pfInterMdBackgroundDecision = (PInterMdBackgroundDecisionFunc)WelsMdInterJudgeBGDPskip;
-    pFuncList->pfInterMdBackgroundInfoUpdate = (PInterMdBackgroundInfoUpdateFunc)WelsMdInterUpdateBGDInfo;
+    pFuncList->pfInterMdBackgroundDecision = WelsMdInterJudgeBGDPskip;
+    pFuncList->pfInterMdBackgroundInfoUpdate = WelsMdInterUpdateBGDInfo;
   } else {
-    pFuncList->pfInterMdBackgroundDecision = (PInterMdBackgroundDecisionFunc)WelsMdInterJudgeBGDPskipFalse;
-    pFuncList->pfInterMdBackgroundInfoUpdate = (PInterMdBackgroundInfoUpdateFunc)WelsMdInterUpdateBGDInfoNULL;
+    pFuncList->pfInterMdBackgroundDecision = WelsMdInterJudgeBGDPskipFalse;
+    pFuncList->pfInterMdBackgroundInfoUpdate = WelsMdInterUpdateBGDInfoNULL;
   }
 }