From b3486b5114a7be5f694b4f3df47867b015c89c1a Mon Sep 17 00:00:00 2001 From: Miika Metsoila Date: Fri, 8 Dec 2017 16:09:00 +0200 Subject: [PATCH] Fix gcc/clang warnings and errors in cfg.c --- src/cfg.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/cfg.c b/src/cfg.c index e3ba2654..9b1d1d2f 100644 --- a/src/cfg.c +++ b/src/cfg.c @@ -1453,7 +1453,7 @@ int kvz_config_validate(const kvz_config *const cfg) error = 1; } - if (validate_hevc_level(cfg)) { + if (validate_hevc_level((kvz_config *const) cfg)) { // a level error found and it's not okay error = 1; } @@ -1463,29 +1463,29 @@ int kvz_config_validate(const kvz_config *const cfg) static int validate_hevc_level(kvz_config *const cfg) { static const struct { uint32_t lsr; uint32_t lps; uint32_t main_bitrate; } LEVEL_CONSTRAINTS[13] = { - { 552'960, 36'864, 128 }, // 1 + { 552960, 36864, 128 }, // 1 - { 3'686'400, 122'880, 1500 }, // 2 - { 7'372'800, 245'760, 3000 }, // 2.1 + { 3686400, 122880, 1500 }, // 2 + { 7372800, 245760, 3000 }, // 2.1 - { 16'588'800, 552'960, 6000 }, // 3 - { 33'177'600, 983'040, 10'000 }, // 3.1 + { 16588800, 552960, 6000 }, // 3 + { 33177600, 983040, 10000 }, // 3.1 - { 66'846'720, 2'228'224, 12'000 }, // 4 - { 133'693'440, 2'228'224, 20'000 }, // 4.1 + { 66846720, 2228224, 12000 }, // 4 + { 133693440, 2228224, 20000 }, // 4.1 - { 267'386'880, 8'912'896, 25'000 }, // 5 - { 534'773'760, 8'912'896, 40'000 }, // 5.1 - { 1'069'547'520, 8'912'896, 60'000 }, // 5.2 + { 267386880, 8912896, 25000 }, // 5 + { 534773760, 8912896, 40000 }, // 5.1 + { 1069547520, 8912896, 60000 }, // 5.2 - { 1'069'547'520, 35'651'584, 60'000 }, // 6 - { 2'139'095'040, 35'651'584, 120'000 }, // 6.1 - { 4'278'190'080, 35'651'584, 240'000 }, // 6.2 + { 1069547520, 35651584, 60000 }, // 6 + { 2139095040, 35651584, 120000 }, // 6.1 + { 4278190080, 35651584, 240000 }, // 6.2 }; // bit rates for the high-tiers of the levels from 4 to 6.2 static const uint32_t HIGH_TIER_BITRATES[8] = { - 30'000, 50'000, 100'000, 160'000, 240'000, 240'000, 480'000, 800'000 + 30000, 50000, 100000, 160000, 240000, 240000, 480000, 800000 }; int level_error = 0;