Fix build with gcc6

Details:
- static_cast in prefs2__pref.h due to narrowing conversion
- add whitespaces in ADM__ffmp43.h to fix string literal handling in C++11

PR:		219280
Reported by:	jbeich
This commit is contained in:
Thomas Zander 2017-05-21 11:57:46 +00:00
parent d65f83f735
commit 20b53b1724
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=441388
3 changed files with 42 additions and 1 deletions

View file

@ -21,7 +21,9 @@ OPTIONS_FILE= ${PORT_DBDIR}/${OPTIONS_NAME:C/-.*//}/options
USES= cmake:outsource pkgconfig iconv gmake compiler:features sqlite USES= cmake:outsource pkgconfig iconv gmake compiler:features sqlite
USES+= dos2unix execinfo USES+= dos2unix execinfo
DOS2UNIX_FILES= cmake/admCheckMiscLibs.cmake DOS2UNIX_FILES= cmake/admCheckMiscLibs.cmake \
avidemux_core/ADM_coreVideoCodec/include/ADM_coreVideoCodec6_export.h \
avidemux_core/ADM_coreVideoCodec/include/ADM_ffmp43.h
CMAKE_ARGS+= -DGNUMAKE_EXECUTABLE=gmake CMAKE_ARGS+= -DGNUMAKE_EXECUTABLE=gmake
CMAKE_ARGS+= -DAVIDEMUX_PACKAGER=none CMAKE_ARGS+= -DAVIDEMUX_PACKAGER=none
CMAKE_ARGS+= -DQT5:BOOL=OFF CMAKE_ARGS+= -DQT5:BOOL=OFF

View file

@ -0,0 +1,11 @@
--- avidemux_core/ADM_coreUtils/src/prefs2_pref.h.orig 2016-01-29 08:47:25 UTC
+++ avidemux_core/ADM_coreUtils/src/prefs2_pref.h
@@ -19,7 +19,7 @@ static optionDesc myOptions[]={
{ FEATURES_REUSE_2PASS_LOG,"features.reuse_2pass_log" ,ADM_param_bool ,"0", 0, 1},
{ FEATURES_AUDIOBAR_USES_MASTER,"features.audiobar_uses_master" ,ADM_param_bool ,"0", 0, 1},
{ FEATURES_THREADING_LAVC,"features.threading_lavc" ,ADM_param_uint32_t ,"0", 0, 32},
-{ FEATURES_CPU_CAPS,"features.cpu_caps" ,ADM_param_uint32_t ,"4294967295", 0, 4294967295},
+{ FEATURES_CPU_CAPS,"features.cpu_caps" ,ADM_param_uint32_t ,"4294967295", 0, static_cast<float>(4294967295)},
{ FEATURES_MPEG_NO_LIMIT,"features.mpeg_no_limit" ,ADM_param_bool ,"0", 0, 1},
{ FEATURES_ALTERNATE_MP3_TAG,"features.alternate_mp3_tag" ,ADM_param_bool ,"1", 0, 1},
{ FEATURES_VDPAU,"features.vdpau" ,ADM_param_bool ,"0", 0, 1},

View file

@ -0,0 +1,28 @@
--- avidemux_core/ADM_coreVideoCodec/include/ADM_ffmp43.h.orig 2017-05-21 11:18:35 UTC
+++ avidemux_core/ADM_coreVideoCodec/include/ADM_ffmp43.h
@@ -180,7 +180,7 @@ ADM_COREVIDEOCODEC6_EXPORT void ADM_lavD
#define WRAP_Open_Template(funcz,argz,display,codecid,extra) \
{\
AVCodec *codec=funcz(argz);\
-if(!codec) {GUI_Error_HIG("Codec",QT_TR_NOOP("Internal error finding codec"display));ADM_assert(0);} \
+if(!codec) {GUI_Error_HIG("Codec",QT_TR_NOOP("Internal error finding codec" display));ADM_assert(0);} \
codecId=codecid; \
_context = avcodec_alloc_context3 (codec);\
ADM_assert (_context);\
@@ -210,13 +210,13 @@ if(!codec) {GUI_Error_HIG("Codec",QT_TR_
\
if (avcodec_open2(_context, codec, NULL) < 0) \
{ \
- printf("[lavc] Decoder init: "display" video decoder failed!\n"); \
- GUI_Error_HIG("Codec","Internal error opening "display); \
+ printf("[lavc] Decoder init: " display " video decoder failed!\n"); \
+ GUI_Error_HIG("Codec","Internal error opening " display); \
ADM_assert(0); \
} \
else \
{ \
- printf("[lavc] Decoder init: "display" video decoder initialized! (%s)\n",codec->long_name); \
+ printf("[lavc] Decoder init: " display " video decoder initialized! (%s)\n",codec->long_name); \
} \
}