shithub: openh264

Download patch

ref: 172d5e7988c3bf811fa26ee4e944a43cabd17e82
parent: cc7535ee52157520770edabda7534dccebda3757
parent: a6ca8bb904baa6088cb516391e2179a463b79d66
author: sijchen <[email protected]>
date: Tue May 13 13:20:24 EDT 2014

Merge pull request #830 from ruil2/console_bug

fix a commit bug for console app

--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -634,6 +634,14 @@
   memset (&fs.sRecFileName[0][0], 0, sizeof (fs.sRecFileName));
 
   FillSpecificParameters (sSvcParam);
+  pSrcPic = new SSourcePicture;
+  if (pSrcPic == NULL) {
+    iRet = 1;
+    goto INSIDE_MEM_FREE;
+  }
+  //fill default pSrcPic
+  pSrcPic->iColorFormat = videoFormatI420;
+  pSrcPic->uiTimeStamp = 0;
 
   // if configure file exit, reading configure file firstly
   if(bConfigFile){
@@ -652,14 +660,6 @@
       goto INSIDE_MEM_FREE;
     }
   }
-  pSrcPic = new SSourcePicture;
-  if (pSrcPic == NULL) {
-    iRet = 1;
-    goto INSIDE_MEM_FREE;
-  }
-  //fill default pSrcPic
-  pSrcPic->iColorFormat = videoFormatI420;
-  pSrcPic->uiTimeStamp = 0;
 
   // if configure file exit, reading configure file firstly
   if(bConfigFile){