shithub: openh264

Download patch

ref: 971ccccab4268f32193c89989bccf485f45b261f
parent: 91cd93e5d0c69fa2f9729c3f042c845e8f44296c
author: huili2 <[email protected]>
date: Mon Jun 16 22:40:28 EDT 2014

remove unnecessary flush buffer in encoder

--- a/codec/encoder/core/src/au_set.cpp
+++ b/codec/encoder/core/src/au_set.cpp
@@ -182,8 +182,6 @@
 
   BsRbspTrailingBits (pBitStringAux);
 
-  BsFlush (pBitStringAux);
-
   return 0;
 }
 
@@ -233,8 +231,6 @@
 
   BsRbspTrailingBits (pBitStringAux);
 
-  BsFlush (pBitStringAux);
-
   return 0;
 }
 
@@ -334,8 +330,6 @@
   BsWriteOneBit (pLocalBitStringAux, false/*pPps->bRedundantPicCntPresentFlag*/);
 
   BsRbspTrailingBits (pLocalBitStringAux);
-
-  BsFlush (pLocalBitStringAux);
 
   return 0;
 }
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -2814,8 +2814,6 @@
 
   BsRbspTrailingBits (pBs);
 
-  BsFlush (pBs);
-
   WelsUnloadNal (pCtx->pOut);
   int32_t iReturn = WelsEncodeNal (&pCtx->pOut->sNalList[iNal], NULL,
                                    pCtx->iFrameBsSize - pCtx->iPosBsBuffer,
--- a/codec/encoder/core/src/nal_encap.cpp
+++ b/codec/encoder/core/src/nal_encap.cpp
@@ -193,7 +193,6 @@
     BsWriteOneBit (pBitStringAux, false/*bStoreRefBasePicFlag*/);
     BsWriteOneBit (pBitStringAux, false);
     BsRbspTrailingBits (pBitStringAux);
-    BsFlush (pBitStringAux);
   }
   return 0;
 }
--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -751,8 +751,6 @@
 
   BsRbspTrailingBits (pBs);
 
-  BsFlush (pBs);
-
   return ENC_RETURN_SUCCESS;
 }