From d381257f5695e26b03041021d2e698747d7c1f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Mangano?= Date: Sat, 4 Feb 2023 16:03:19 +0900 Subject: [PATCH] Restore compatibility with ffmpeg 4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to ffmpeg’s APIchanges (https://github.com/FFmpeg/FFmpeg/blob/master/doc/APIchanges), the signature for av_find_best_stream changed with libavf 59. --- lib/audio/stream.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/audio/stream.cc b/lib/audio/stream.cc index 808851f..9130805 100644 --- a/lib/audio/stream.cc +++ b/lib/audio/stream.cc @@ -193,7 +193,11 @@ static int open_demuxer(const char *url, oshu::stream *stream) stream->demuxer, AVMEDIA_TYPE_AUDIO, -1, -1, +#if (LIBAVFORMAT_VERSION_MAJOR < 59) + &stream->codec, +#else (const AVCodec**)&stream->codec, +#endif 0 ); if (rc < 0 || stream->codec == NULL) {