ref: e945654f062714455b22470319786a35a5a82d7e
parent: 8661e358c0680f94844a19282e85ab89b78e8372
author: Martin Storsjö <[email protected]>
date: Wed Jun 15 17:06:03 EDT 2016
Use assert.h instead of cassert This fixes building for android differently than in f5e483ce. On android, <cassert> isn't available in the normal include path, only when the STL headers are available. We intentionally avoid using STL within the main libopenh264.so, to simplify dependency chains for users of the library (which otherwise could run into conflicts if the surrounding app would want to use a different STL implementation). The previous fix only provided headers, not actually linking against STL, so at this point it's not a real issue yet, but it's still a very slippery slope towards accidentally starting relying on STL within the core library. Instead explicitly avoid using STL within the core library, by not even providing the include path.
--- a/build/platform-android.mk
+++ b/build/platform-android.mk
@@ -62,7 +62,6 @@
CODEC_UNITTEST_LDFLAGS_SUFFIX = $(STL_LIB)
MODULE_INCLUDES = $(STL_INCLUDES)
MODULE_LDFLAGS = $(STL_LIB)
-CXXFLAGS += $(STL_INCLUDES)
ifeq (./,$(SRC_PATH))
binaries: decdemo encdemo
--- a/codec/processing/src/downsample/downsample.cpp
+++ b/codec/processing/src/downsample/downsample.cpp
@@ -32,7 +32,7 @@
#include "downsample.h"
#include "cpu.h"
-#include <cassert>
+#include <assert.h>
WELSVP_NAMESPACE_BEGIN
#define MAX_SAMPLE_WIDTH 1920