From 186c0fad109837735dd76b2c9886468f20c12c7f Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Fri, 5 Dec 2025 07:38:38 +0100 Subject: [PATCH] update CI to FFmpeg 8.0.1, preserve avcodec_close() for older FFmpeg versions --- .github/scripts/build.sh | 3 +-- psxavenc/decoding.c | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/scripts/build.sh b/.github/scripts/build.sh index 35616d9..f3c8bb0 100755 --- a/.github/scripts/build.sh +++ b/.github/scripts/build.sh @@ -1,7 +1,7 @@ #!/bin/bash ROOT_DIR="$(pwd)" -FFMPEG_VERSION="7.1.1" +FFMPEG_VERSION="8.0.1" NUM_JOBS="4" if [ $# -eq 1 ]; then @@ -44,7 +44,6 @@ cd ffmpeg-build --disable-programs \ --disable-doc \ --disable-avdevice \ - --disable-postproc \ --disable-avfilter \ --disable-network \ --disable-encoders \ diff --git a/psxavenc/decoding.c b/psxavenc/decoding.c index 6540874..cdf2265 100644 --- a/psxavenc/decoding.c +++ b/psxavenc/decoding.c @@ -447,6 +447,10 @@ void close_av_data(decoder_t *decoder) { av_frame_free(&(av->frame)); swr_free(&(av->resampler)); +#if LIBAVCODEC_VERSION_MAJOR < 61 + // Deprecated, kept for compatibility with older FFmpeg versions. + avcodec_close(av->audio_codec_context); +#endif avcodec_free_context(&(av->audio_codec_context)); avformat_free_context(av->format);