[x265] [PATCH] Replace bool with int to prevent portability issues
pooja at multicorewareinc.com
pooja at multicorewareinc.com
Wed Mar 6 06:11:49 CET 2019
# HG changeset patch
# User Pooja Venkatesan <pooja at multicorewareinc.com>
# Date 1551848778 -19800
# Wed Mar 06 10:36:18 2019 +0530
# Node ID f564180a0305b3c7b4d9ed3713b90b9682447e11
# Parent 2abd2a1909a457a98c2a67be64fc3a4643fc88f0
Replace bool with int to prevent portability issues
diff -r 2abd2a1909a4 -r f564180a0305 source/CMakeLists.txt
--- a/source/CMakeLists.txt Tue Mar 05 14:18:21 2019 +0530
+++ b/source/CMakeLists.txt Wed Mar 06 10:36:18 2019 +0530
@@ -29,7 +29,7 @@
option(STATIC_LINK_CRT "Statically link C runtime for release builds" OFF)
mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)
# X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 171)
+set(X265_BUILD 172)
configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
"${PROJECT_BINARY_DIR}/x265.def")
configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
diff -r 2abd2a1909a4 -r f564180a0305 source/encoder/api.cpp
--- a/source/encoder/api.cpp Tue Mar 05 14:18:21 2019 +0530
+++ b/source/encoder/api.cpp Wed Mar 06 10:36:18 2019 +0530
@@ -101,8 +101,8 @@
if (p->rc.zoneCount || p->rc.zonefileCount)
{
int zoneCount = p->rc.zonefileCount ? p->rc.zonefileCount : p->rc.zoneCount;
- param->rc.zones = x265_zone_alloc(zoneCount, p->rc.zonefileCount ? true : false);
- latestParam->rc.zones = x265_zone_alloc(zoneCount, p->rc.zonefileCount ? true : false);
+ param->rc.zones = x265_zone_alloc(zoneCount, !!p->rc.zonefileCount);
+ latestParam->rc.zones = x265_zone_alloc(zoneCount, !!p->rc.zonefileCount);
}
x265_copy_params(param, p);
@@ -296,7 +296,7 @@
if (encoder->m_latestParam->rc.zoneCount || encoder->m_latestParam->rc.zonefileCount)
{
int zoneCount = encoder->m_latestParam->rc.zonefileCount ? encoder->m_latestParam->rc.zonefileCount : encoder->m_latestParam->rc.zoneCount;
- save.rc.zones = x265_zone_alloc(zoneCount, encoder->m_latestParam->rc.zonefileCount ? true : false);
+ save.rc.zones = x265_zone_alloc(zoneCount, !!encoder->m_latestParam->rc.zonefileCount);
}
x265_copy_params(&save, encoder->m_latestParam);
int ret = encoder->reconfigureParam(encoder->m_latestParam, param_in);
@@ -933,7 +933,7 @@
return x265_free(p);
}
-x265_zone *x265_zone_alloc(int zoneCount, bool isZoneFile)
+x265_zone *x265_zone_alloc(int zoneCount, int isZoneFile)
{
x265_zone* zone = (x265_zone*)x265_malloc(sizeof(x265_zone) * zoneCount);
if (isZoneFile) {
diff -r 2abd2a1909a4 -r f564180a0305 source/x265.h
--- a/source/x265.h Tue Mar 05 14:18:21 2019 +0530
+++ b/source/x265.h Wed Mar 06 10:36:18 2019 +0530
@@ -1798,7 +1798,7 @@
#define X265_PARAM_BAD_VALUE (-2)
int x265_param_parse(x265_param *p, const char *name, const char *value);
-x265_zone *x265_zone_alloc(int zoneCount, bool isZoneFile);
+x265_zone *x265_zone_alloc(int zoneCount, int isZoneFile);
void x265_zone_free(x265_param *param);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 2970 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20190306/efb22a34/attachment.bin>
More information about the x265-devel
mailing list