From b4f3fcdc4861975ec49ae2bb894f907c072fc8f6 Mon Sep 17 00:00:00 2001 From: Abs62 Date: Sat, 11 Oct 2025 21:27:23 +0300 Subject: [PATCH] Fix compilation with FFMpeg 8.0 (issue #1729) --- ffmpegaudio.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ffmpegaudio.cc b/ffmpegaudio.cc index 5ef602ad8..b7cd7ddfd 100644 --- ffmpegaudio.cc +++ ffmpegaudio.cc @@ -350,7 +350,9 @@ void DecoderContext::closeCodec() if ( audioStream_ && codecContext_ && codec_ ) { audioStream_->discard = AVDISCARD_ALL; +#if LIBAVCODEC_VERSION_MAJOR < 61 avcodec_close( codecContext_ ); +#endif #if LIBAVCODEC_VERSION_MAJOR > 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR >= 33 ) avcodec_free_context( &codecContext_ ); #endif