Qt GUI build fix for new ffmpeg macro that expands to a C++20 designated initializer that is not supported by earlier compiler standards.

This commit is contained in:
harry 2023-01-15 01:04:39 -05:00
parent 9a969edf99
commit 8a59bd3191
3 changed files with 17 additions and 7 deletions

View File

@ -10,14 +10,14 @@ set DEPLOY_GROUP=master
IF DEFINED APPVEYOR_REPO_TAG_NAME set DEPLOY_GROUP=%APPVEYOR_REPO_TAG_NAME% IF DEFINED APPVEYOR_REPO_TAG_NAME set DEPLOY_GROUP=%APPVEYOR_REPO_TAG_NAME%
msbuild %PROJECT_ROOT%\vc\vc14_fceux.vcxproj /p:Configuration=%BUILD_CONFIG% /p:Platform="Win32" msbuild %PROJECT_ROOT%\vc\vc14_fceux.vcxproj /p:Configuration=%BUILD_CONFIG% /p:Platform="Win32"
@if ERRORLEVEL 1 goto end if %ERRORLEVEL% NEQ 0 EXIT /B 1
cd %PROJECT_ROOT%\vc cd %PROJECT_ROOT%\vc
REM Create Zip Archive REM Create Zip Archive
cd %PROJECT_ROOT%\output cd %PROJECT_ROOT%\output
..\vc\zip -X -9 -r ..\vc\%ZIP_FILENAME% fceux.exe fceux.chm taseditor.chm lua5.1.dll lua51.dll 7z.dll auxlib.lua palettes luaScripts tools ..\vc\zip -X -9 -r ..\vc\%ZIP_FILENAME% fceux.exe fceux.chm taseditor.chm lua5.1.dll lua51.dll 7z.dll auxlib.lua palettes luaScripts tools
@if ERRORLEVEL 1 goto end if %ERRORLEVEL% NEQ 0 EXIT /B 1
cd %PROJECT_ROOT% cd %PROJECT_ROOT%

View File

@ -10,7 +10,7 @@ set DEPLOY_GROUP=master
IF DEFINED APPVEYOR_REPO_TAG_NAME set DEPLOY_GROUP=%APPVEYOR_REPO_TAG_NAME% IF DEFINED APPVEYOR_REPO_TAG_NAME set DEPLOY_GROUP=%APPVEYOR_REPO_TAG_NAME%
msbuild %PROJECT_ROOT%\vc\vc14_fceux.vcxproj /p:Configuration=%BUILD_CONFIG% /p:Platform="x64" msbuild %PROJECT_ROOT%\vc\vc14_fceux.vcxproj /p:Configuration=%BUILD_CONFIG% /p:Platform="x64"
@if ERRORLEVEL 1 goto end if %ERRORLEVEL% NEQ 0 EXIT /B 1
cd %PROJECT_ROOT%\vc cd %PROJECT_ROOT%\vc
@ -18,9 +18,9 @@ REM Create Zip Archive
cd %PROJECT_ROOT%\output cd %PROJECT_ROOT%\output
..\vc\zip -X -9 -j ..\vc\%ZIP_FILENAME% ..\vc\x64\%BUILD_CONFIG%\fceux64.exe ..\src\drivers\win\lua\x64\lua5.1.dll ..\src\drivers\win\lua\x64\lua51.dll ..\src\auxlib.lua ..\src\drivers\win\7z_64.dll ..\vc\zip -X -9 -j ..\vc\%ZIP_FILENAME% ..\vc\x64\%BUILD_CONFIG%\fceux64.exe ..\src\drivers\win\lua\x64\lua5.1.dll ..\src\drivers\win\lua\x64\lua51.dll ..\src\auxlib.lua ..\src\drivers\win\7z_64.dll
@if ERRORLEVEL 1 goto end if %ERRORLEVEL% NEQ 0 EXIT /B 1
..\vc\zip -X -9 -u -r ..\vc\%ZIP_FILENAME% fceux.chm taseditor.chm palettes luaScripts tools ..\vc\zip -X -9 -u -r ..\vc\%ZIP_FILENAME% fceux.chm taseditor.chm palettes luaScripts tools
@if ERRORLEVEL 1 goto end if %ERRORLEVEL% NEQ 0 EXIT /B 1
cd %PROJECT_ROOT% cd %PROJECT_ROOT%

View File

@ -1319,9 +1319,14 @@ static AVFrame *alloc_audio_frame(const AVCodecContext *c,
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 28, 100) #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 28, 100)
static int select_audio_channel_layout(const OutputStream *ost, const AVCodec *codec, AVChannelLayout *dst) static int select_audio_channel_layout(const OutputStream *ost, const AVCodec *codec, AVChannelLayout *dst)
{ {
const AVChannelLayout *p, *best_ch_layout;
const AVChannelLayout defaultLayout = AV_CHANNEL_LAYOUT_MONO;
int best_nb_channels = 0; int best_nb_channels = 0;
const AVChannelLayout *p, *best_ch_layout;
#if __cplusplus >= 202002L
const AVChannelLayout defaultLayout = AV_CHANNEL_LAYOUT_MONO;
#else
const AVChannelLayout defaultLayout;
av_channel_layout_from_mask( &defaultLayout, AV_CH_LAYOUT_MONO );
#endif
if (!codec->ch_layouts) if (!codec->ch_layouts)
{ {
@ -1505,7 +1510,12 @@ static int initAudioStream( const char *codec_name, OutputStream *ost )
#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100) #if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100)
av_opt_set_int(ost->swr_ctx, "in_channel_layout", AV_CH_LAYOUT_MONO, 0); av_opt_set_int(ost->swr_ctx, "in_channel_layout", AV_CH_LAYOUT_MONO, 0);
#else #else
#if __cplusplus >= 202002L
AVChannelLayout src_ch_layout = AV_CHANNEL_LAYOUT_MONO; AVChannelLayout src_ch_layout = AV_CHANNEL_LAYOUT_MONO;
#else
AVChannelLayout src_ch_layout;
av_channel_layout_from_mask( &src_ch_layout, AV_CH_LAYOUT_MONO );
#endif
av_opt_set_chlayout(ost->swr_ctx, "in_chlayout", &src_ch_layout, 0); av_opt_set_chlayout(ost->swr_ctx, "in_chlayout", &src_ch_layout, 0);
#endif #endif
av_opt_set_sample_fmt(ost->swr_ctx, "out_sample_fmt", c->sample_fmt, 0); av_opt_set_sample_fmt(ost->swr_ctx, "out_sample_fmt", c->sample_fmt, 0);