Hi, With ffmpeg 7 k3b fail to build with these errors /home/marillat/src/k3b-24.02.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp: In member function ‘bool K3bFFMpegFile::open()’: /home/marillat/src/k3b-24.02.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp:143:26: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘channels’ 143 | d->codecContext->channels > 1; | ^~~~~~~~ /home/marillat/src/k3b-24.02.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp: In member function ‘void K3bFFMpegFile::close()’: /home/marillat/src/k3b-24.02.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp:159:24: warning: ‘int avcodec_close(AVCodecContext*)’ is deprecated [-Wdeprecated-declarations] 159 | ::avcodec_close(d->codecContext); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /home/marillat/src/k3b-24.02.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp:19: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:2387:5: note: declared here 2387 | int avcodec_close(AVCodecContext *avctx); | ^~~~~~~~~~~~~ /home/marillat/src/k3b-24.02.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp: In member function ‘int K3bFFMpegFile::channels() const’: /home/marillat/src/k3b-24.02.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp:188:29: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘channels’ 188 | return d->codecContext->channels;
Hi, Thanks for your bug report! FFmpeg avutil: remove deprecated FF_API_OLD_CHANNEL_LAYOUT[1] and tag as 7.0[2]. So add libavcodec version major check for FFmpeg in k3b side[3]. But I still need to migrate the deprecated `channels`[4] to FFmpeg v7.0. [1] https://patchwork.ffmpeg.org/project/ffmpeg/patch/20240125134425.374-17-jamrial@gmail.com/ [2] https://github.com/FFmpeg/FFmpeg/commit/65ddc74988245a01421a63c5cffa4d900c47117c [3] https://github.com/KDE/k3b/commit/712ef4adc992fd848dfd769f346f87216029c285 [4] https://github.com/FFmpeg/FFmpeg/blob/n6.2-dev/libavcodec/avcodec.h#L1072 Thanks, Leslie Zhai
(In reply to Leslie Zhai from comment #1) > Hi, > https://github.com/KDE/k3b/commit/712ef4adc992fd848dfd769f346f87216029c285 For the record LIBAVCODEC_VERSION_MAJOR come from the library soname We have libavcodec.so.61.3.100 in FFmpeg 7.0 #if LIBAVCODEC_VERSION_MAJOR < 70 must be #if LIBAVCODEC_VERSION_MAJOR < 61
(In reply to marillat from comment #2) > (In reply to Leslie Zhai from comment #1) > > Hi, > > https://github.com/KDE/k3b/commit/712ef4adc992fd848dfd769f346f87216029c285 > > For the record LIBAVCODEC_VERSION_MAJOR come from the library soname > We have libavcodec.so.61.3.100 in FFmpeg 7.0 > #if LIBAVCODEC_VERSION_MAJOR < 70 > must be > #if LIBAVCODEC_VERSION_MAJOR < 61 Thanks for pointing out my fault! Fixed: https://github.com/KDE/k3b/commit/071535a79c3d2b074163cbb0881117a995ed17cd
Can you please point to invent instead of the github mirror¿
(In reply to Albert Astals Cid from comment #4) > Can you please point to invent instead of the github mirror¿ Hi Albert, I will point to invent, I thought it was internal unavailable without KDE Identity :P Thanks, Leslie Zhai