shithub: openh264

Download patch

ref: 4dc0f0782869b0b406225cdcc18a614c8b9a3c6a
parent: 2f8f2880ffdd427d3e066529676578d4f9aa7f3e
author: unknown <ruil2@RUIL2-WS01.cisco.com>
date: Mon May 12 07:55:05 EDT 2014

fix input source width and height setting issue

--- a/codec/encoder/core/src/wels_preprocess.cpp
+++ b/codec/encoder/core/src/wels_preprocess.cpp
@@ -177,6 +177,12 @@
   if (!m_bInitDone) {
     if (WelsPreprocessCreate() != 0)
       return -1;
+
+    //init source width and height
+    pSvcParam->SUsedPicRect.iLeft = 0;
+    pSvcParam->SUsedPicRect.iTop  = 0;
+    pSvcParam->SUsedPicRect.iWidth = ((kpSrcPic->iPicWidth >> 1) << 1);
+    pSvcParam->SUsedPicRect.iHeight = ((kpSrcPic->iPicHeight >> 1) << 1);
     if (WelsPreprocessReset (pCtx) != 0)
       return -1;