Dear Maintainer, I did a test build using the version of performous in experimental on Sid and Ubuntu Kinetic. I found that it continues to have a const-related build failure.
Upstream commit https://github.com/performous/performous/pull/752/commits/80d5b08d34a97db16fe12f82e9060570087ef0f0 is a step in the right direction, but in this older codebase needed more. Please see attached for a patch that fixes build of the version in experimental with Sid and Ubuntu Kinetic. -Dan
Description: constify AVCodec* for ffmpeg 5 compat Origin: https://github.com/performous/performous/pull/752/commits/80d5b08d34a97db16fe12f82e9060570087ef0f0 Author: Dan Bungert <daniel.bung...@canonical.com> Bug-Ubuntu: https://bugs.launchpad.net/bugs/1982781 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004616 Forwarded: not-needed Last-Update: 2022-07-25 Extended above commit to handle an additional const. --- a/game/ffmpeg.cc +++ b/game/ffmpeg.cc @@ -96,10 +96,16 @@ if (avformat_find_stream_info(m_formatContext, nullptr) < 0) throw std::runtime_error("Cannot find stream information"); m_formatContext->flags |= AVFMT_FLAG_GENPTS; // Find a track and open the codec +#if (LIBAVFORMAT_VERSION_INT) >= (AV_VERSION_INT(59, 0, 100)) + const +#endif AVCodec* codec = nullptr; m_streamId = av_find_best_stream(m_formatContext, (AVMediaType)m_mediaType, -1, -1, &codec, 0); if (m_streamId < 0) throw std::runtime_error("No suitable track found"); +#if (LIBAVFORMAT_VERSION_INT) >= (AV_VERSION_INT(59, 0, 100)) + const +#endif #if (LIBAVCODEC_VERSION_INT) >= (AV_VERSION_INT(57,0,0)) AVCodec* pCodec = avcodec_find_decoder(m_formatContext->streams[m_streamId]->codecpar->codec_id); AVCodecContext* pCodecCtx = avcodec_alloc_context3(pCodec);