shithub: openh264

Download patch

ref: a5411eb74791796426ca88f8a8d2b67962de557c
parent: fff39090530ef03520008d26189fd70b83aa4a3d
parent: b2dafa5a9277c66c9ad942e59104c235b3a5c1e1
author: huili2 <[email protected]>
date: Mon Mar 10 05:27:56 EDT 2014

Merge pull request #464 from licaiguo/fix-type-wels-read-verify

fix WELS_READ_VERIFY

--- a/codec/decoder/core/inc/dec_golomb.h
+++ b/codec/decoder/core/inc/dec_golomb.h
@@ -49,10 +49,11 @@
 
 namespace WelsDec {
 
-#define WELS_READ_VERIFY(uiRet) { \
-  if( uiRet != ERR_NONE ) \
-    return uiRet; \
-}
+#define WELS_READ_VERIFY(uiRet) do{ \
+  uint32_t uiRetTmp = (uint32_t)uiRet; \
+  if( uiRetTmp != ERR_NONE ) \
+    return uiRetTmp; \
+}while(0)
 #define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
   if (iReadBytes > iAllowedBytes+1) { \
     return ERR_INFO_READ_OVERFLOW; \