shithub: openh264

Download patch

ref: 698ba11bb62607eb24f668ecc2f6760c4f4b6ef2
parent: 3a75956fb2584cca84a95ba1fcbc72fa2c91f98d
parent: 82cd357bae7f0696a37a0db344edbf411a97ef80
author: sijchen <sijchen@cisco.com>
date: Mon Mar 9 05:16:05 EDT 2015

Merge pull request #1840 from shihuade/UT_BugFixed_V1.0

fixed bug for UT--setoptionParamExt

--- a/test/api/encode_decode_api_test.cpp
+++ b/test/api/encode_decode_api_test.cpp
@@ -2217,9 +2217,7 @@
     int iResult;
     int len = 0;
     unsigned char* pData[3] = { NULL };
-    int iTotalSliceSize = 0;
 
-
     RandomParamExtCombination();
     iResult = encoder_->SetOption (ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, &param_);
     //ValidateParamExtCombination();
@@ -2235,11 +2233,11 @@
       pData[0] = pData[1] = pData[2] = 0;
       memset (&dstBufInfo_, 0, sizeof (SBufferInfo));
 
-      iResult = decoder_->DecodeFrame2 (info.sLayerInfo[0].pBsBuf, iTotalSliceSize, pData, &dstBufInfo_);
+      iResult = decoder_->DecodeFrame2 (info.sLayerInfo[0].pBsBuf, len, pData, &dstBufInfo_);
       ASSERT_TRUE (iResult == cmResultSuccess);
       iResult = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_);
       ASSERT_TRUE (iResult == cmResultSuccess);
-      EXPECT_EQ (dstBufInfo_.iBufferStatus, 0);
+      EXPECT_EQ (dstBufInfo_.iBufferStatus, 1);
     }
   }