shithub: openh264

Download patch

ref: 34cb0d60aa957e320f3b4dde8e5572a37f47e5d0
parent: 468fce0887a1f88d880cd7030ed13967e3f72360
parent: f0c6891627df3ccacf8ad409522c51b5442df1d1
author: sijchen <[email protected]>
date: Fri Oct 24 10:41:51 EDT 2014

Merge pull request #1450 from mstorsjo/avoid-warnings

Add casts to avoid warnings about comparison between signed and unsigned

--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -716,7 +716,7 @@
                                        ==
                                        SM_DYN_SLICE);
 
-  assert (kiSliceIdx == pCurSlice->uiSliceIdx);
+  assert (kiSliceIdx == (int) pCurSlice->uiSliceIdx);
 
   if (I_SLICE == pEncCtx->eSliceType) {
     pNalHeadExt->bIdrFlag = 1;
@@ -882,7 +882,7 @@
     }
     const bool    kbSliceNumNotExceedConstraint = pSliceCtx->iSliceNumInFrame <
         pSliceCtx->iMaxSliceNumConstraint; /*tmp choice to avoid complex memory operation, 100520, to be modify*/
-    const bool    kbSliceIdxNotExceedConstraint = (pCurSlice->uiSliceIdx + kiActiveThreadsNum) <
+    const bool    kbSliceIdxNotExceedConstraint = ((int) pCurSlice->uiSliceIdx + kiActiveThreadsNum) <
         pSliceCtx->iMaxSliceNumConstraint;
     const bool    kbSliceNumReachConstraint = (pSliceCtx->iSliceNumInFrame ==
         pSliceCtx->iMaxSliceNumConstraint);
--- a/test/api/encode_decode_api_test.cpp
+++ b/test/api/encode_decode_api_test.cpp
@@ -1668,7 +1668,7 @@
     encToDecData (info, len);
     unsigned char* pData[3] = { NULL };
     memset (&dstBufInfo_, 0, sizeof (SBufferInfo));
-    if (iIdx < strlen (p.pLossSequence)) {
+    if (iIdx < (int) strlen (p.pLossSequence)) {
       switch (p.pLossSequence[iIdx]) {
       case '0':
         iTarDid = 0;