shithub: openh264

Download patch

ref: 3d6fdfee3dfe9069e25fe32974fffe522484d47d
parent: 161f5a4bd135c87cc08f385498a58c4b68471013
parent: 8b907c18fd0777e661bb680d3638f0482355b3ea
author: Licai Guo <[email protected]>
date: Wed Mar 12 15:23:51 EDT 2014

Merge pull request #480 from volvet/fix-idr-interval-issue

fix idr interval issue

--- a/codec/encoder/core/inc/param_svc.h
+++ b/codec/encoder/core/inc/param_svc.h
@@ -369,7 +369,7 @@
   uiIntraPeriod		= pCodingParam.uiIntraPeriod;// intra period (multiple of GOP size as desired)
   if (uiIntraPeriod == (uint32_t) (-1))
     uiIntraPeriod = 0;
-  else if (uiIntraPeriod & uiGopSize)	// none multiple of GOP size
+  else if (uiIntraPeriod & (uiGopSize-1))	// none multiple of GOP size
     uiIntraPeriod = ((uiIntraPeriod + uiGopSize - 1) / uiGopSize) * uiGopSize;
 
   iLTRRefNum = bEnableLongTermReference ? LONG_TERM_REF_NUM : 0;