From 6eba621045dd181472b9cda1043d5b8af10e2de5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 22 Feb 2021 13:36:08 +0100 Subject: [PATCH] decoder/ffmpeg: fix build problem with FFmpeg 3.4 Regression by commit a22d1c88d7e11bfdc553f38a86d416783421c7e4 Closes https://github.com/MusicPlayerDaemon/MPD/issues/1097 --- NEWS | 2 ++ src/decoder/plugins/FfmpegDecoderPlugin.cxx | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 47d6b7b98..47e7f1be4 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.22.7 (not yet released) +* decoder + - ffmpeg: fix build problem with FFmpeg 3.4 ver 0.22.6 (2021/02/16) * fix missing tags on songs in queue diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx index b274ae4fb..889062ee6 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -467,7 +467,11 @@ FfmpegCheckTag(DecoderClient &client, InputStream *is, static bool IsSeekable(const AVFormatContext &format_context) noexcept { +#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(58, 6, 100) return (format_context.ctx_flags & AVFMTCTX_UNSEEKABLE) != 0; +#else + return false; +#endif } static void