From 179c0985f00a7f248e0376f106bb5af2be0636ea Mon Sep 17 00:00:00 2001 From: MadDeCoDeR <18539489+MadDeCoDeR@users.noreply.github.com> Date: Wed, 8 Jan 2025 18:52:04 +0200 Subject: [PATCH] FFMPEG - Github Actions - Remove deprecated function for FFMPEG 7 and further attempt to fix linux builds --- .github/workflows/cmake_linux_x64.yml | 2 +- neo/renderer/Cinematic.cpp | 2 -- neo/sound/AVD.cpp | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake_linux_x64.yml b/.github/workflows/cmake_linux_x64.yml index 8b1dd685..630a1b7b 100644 --- a/.github/workflows/cmake_linux_x64.yml +++ b/.github/workflows/cmake_linux_x64.yml @@ -29,7 +29,7 @@ jobs: - name: Download Depedencies id: step4 - run: sudo apt-get install -y build-essential autoconf cmake libglu1-mesa-dev freeglut3-dev mesa-common-dev libxmu-dev libxi-dev libgl-dev libx11-dev libxft-dev libxext-dev nasm libwayland-dev libxkbcommon-dev libegl1-mesa-dev libdecor-0-dev libxrandr-dev libxxf86vm-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-glx0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-randr0-dev python3-jinja2 + run: sudo apt-get install -y build-essential autoconf libtool cmake libglu1-mesa-dev freeglut3-dev mesa-common-dev libxmu-dev libxi-dev libgl-dev libx11-dev libxft-dev libxext-dev nasm libwayland-dev libxkbcommon-dev libegl1-mesa-dev libdecor-0-dev libxrandr-dev libxxf86vm-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-glx0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-randr0-dev python3-jinja2 - name: Cache linux vcpkg id: step5 diff --git a/neo/renderer/Cinematic.cpp b/neo/renderer/Cinematic.cpp index 487b65b4..08db20dd 100644 --- a/neo/renderer/Cinematic.cpp +++ b/neo/renderer/Cinematic.cpp @@ -992,7 +992,6 @@ void idCinematicLocal::Close() if (audio_stream_index >= 0) { if (dec_ctx2) { - avcodec_close(dec_ctx2); avcodec_free_context(&dec_ctx2); } @@ -1019,7 +1018,6 @@ void idCinematicLocal::Close() if( dec_ctx ) { - avcodec_close( dec_ctx ); avcodec_free_context(&dec_ctx); } diff --git a/neo/sound/AVD.cpp b/neo/sound/AVD.cpp index 8937ae5d..35020732 100644 --- a/neo/sound/AVD.cpp +++ b/neo/sound/AVD.cpp @@ -246,7 +246,7 @@ bool DecodeXAudio(byte** audio,int* len, idWaveFile::waveFmt_t* format,bool ext) swr_free(&swr_ctx); } - avcodec_close(dec_ctx); + avcodec_free_context(&dec_ctx); av_free(fmt_ctx->pb); avformat_close_input(&fmt_ctx); @@ -445,7 +445,6 @@ bool DecodeALAudio(byte** audio, int* len, int *rate, ALenum *sample) { swr_free(&swr_ctx); } - avcodec_close(dec_ctx); avcodec_free_context(&dec_ctx); avformat_close_input(&fmt_ctx);