shithub: openh264

Download patch

ref: b76714719e19bd01ada643305c65ea13cdb5f0c0
parent: 3f333b01fdc194d03d5c3902c3a819d53041e7ae
author: Martin Storsjö <martin@martin.st>
date: Wed Jun 25 05:19:23 EDT 2014

Print an intX_t by casting to int64_t

The internal intX_t is either int32_t or int64_t depending on
platform bitness. Since there is no existing printf format for
such an integer, cast it to an int64_t and use the right
printf format for that instead.

This avoids warnings when building with clang.

--- a/codec/decoder/core/src/decode_slice.cpp
+++ b/codec/decoder/core/src/decode_slice.cpp
@@ -415,8 +415,8 @@
     }
     if (iUsedBits > pBs->iBits) { //When BS incomplete, as long as find it, SHOULD stop decoding to avoid mosaic or crash.
       WelsLog (pCtx, WELS_LOG_WARNING,
-               "WelsDecodeSlice()::::pBs incomplete, iUsedBits:%d > pBs->iBits:%d, MUST stop decoding.\n",
-               iUsedBits, pBs->iBits);
+               "WelsDecodeSlice()::::pBs incomplete, iUsedBits:%"PRId64" > pBs->iBits:%d, MUST stop decoding.\n",
+               (int64_t) iUsedBits, pBs->iBits);
       return -1;
     }
     iMbX = iNextMbXyIndex % pCurLayer->iMbWidth;