shithub: openh264

Download patch

ref: c05e1ad797cfd2a22c2895872e22a0400996fec3
parent: 24cd5afa33c8c46a670b90febd1111dfd80e4383
author: JuannyWang <hongjwan@cisco.com>
date: Fri Jul 4 14:44:03 EDT 2014

modify console for disable delay skip if maxbr==0

--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -163,11 +163,11 @@
       } else if (strTag[0].compare ("MaxSpatialBitrate") == 0) {
         pDLayer->iMaxSpatialBitrate = 1000 * atoi (strTag[1].c_str());
         if (pSvcParam.iRCMode != RC_OFF_MODE) {
-          if (pDLayer->iMaxSpatialBitrate <= 0) {
+          if (pDLayer->iMaxSpatialBitrate < 0) {
             fprintf (stderr, "Invalid max spatial bitrate(%d) in dependency layer #%d.\n", pDLayer->iMaxSpatialBitrate, iLayer);
             return -1;
           }
-          if (pDLayer->iMaxSpatialBitrate < pDLayer->iSpatialBitrate) {
+          if (pDLayer->iMaxSpatialBitrate > 0 && pDLayer->iMaxSpatialBitrate < pDLayer->iSpatialBitrate) {
             fprintf (stderr, "Invalid max spatial(#%d) bitrate(%d) setting::: < layerBitrate(%d)!\n", iLayer,
                      pDLayer->iMaxSpatialBitrate, pDLayer->iSpatialBitrate);
             return -1;
@@ -273,7 +273,7 @@
         }
       } else if (strTag[0].compare ("MaxOverallBitrate") == 0) {
         pSvcParam.iMaxBitrate	= 1000 * atoi (strTag[1].c_str());
-        if ((pSvcParam.iRCMode != RC_OFF_MODE) && pSvcParam.iMaxBitrate <= 0) {
+        if ((pSvcParam.iRCMode != RC_OFF_MODE) && pSvcParam.iMaxBitrate < 0) {
           fprintf (stderr, "Invalid max overall bitrate setting due to RC enabled. Check MaxOverallBitrate field please!\n");
           return 1;
         }