Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 834404

Summary: media-video/ffmpegthumbnailer-2.2.2 with ffmpeg-5.0: libffmpegthumbnailer/moviedecoder.cpp:73:5: error: ‘av_register_all’ was not declared in this scope
Product: Gentoo Linux Reporter: Kobboi <gentoo>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 831437    
Attachments: build.log.gz
emerge-info.txt

Description Kobboi 2022-02-28 20:55:24 UTC
[8/12] /usr/bin/x86_64-pc-linux-gnu-g++ -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -I/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2_build  -O2 -march=znver3 -pipe -g -ggdb3 -fPIC -std=c++11 -MD -MT CMakeFiles/libffmpegthumbnailerobj.dir/libffmpegthumbnailer/moviedecoder.cpp.o -MF CMakeFiles/libffmpegthumbnailerobj.dir/libffmpegthumbnailer/moviedecoder.cpp.o.d -o CMakeFiles/libffmpegthumbnailerobj.dir/libffmpegthumbnailer/moviedecoder.cpp.o -c /var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp
FAILED: CMakeFiles/libffmpegthumbnailerobj.dir/libffmpegthumbnailer/moviedecoder.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -I/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2_build  -O2 -march=znver3 -pipe -g -ggdb3 -fPIC -std=c++11 -MD -MT CMakeFiles/libffmpegthumbnailerobj.dir/libffmpegthumbnailer/moviedecoder.cpp.o -MF CMakeFiles/libffmpegthumbnailerobj.dir/libffmpegthumbnailer/moviedecoder.cpp.o.d -o CMakeFiles/libffmpegthumbnailerobj.dir/libffmpegthumbnailer/moviedecoder.cpp.o -c /var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp: In member function ‘void ffmpegthumbnailer::MovieDecoder::initialize(const string&, bool)’:
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp:73:5: error: ‘av_register_all’ was not declared in this scope
   73 |     av_register_all();
      |     ^~~~~~~~~~~~~~~
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp:74:5: error: ‘avcodec_register_all’ was not declared in this scope
   74 |     avcodec_register_all();
      |     ^~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp: In member function ‘int32_t ffmpegthumbnailer::MovieDecoder::findPreferedVideoStream(bool)’:
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp:155:50: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
  155 |         auto ctx = m_pFormatContext->streams[i]->codec;
      |                                                  ^~~~~
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp: In member function ‘void ffmpegthumbnailer::MovieDecoder::initializeVideo(bool)’:
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp:206:44: error: ‘struct AVStream’ has no member named ‘codec’
  206 |     m_pVideoCodecContext = m_pVideoStream->codec;
      |                                            ^~~~~
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp:207:41: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
  207 |     m_pVideoCodec = avcodec_find_decoder(m_pVideoCodecContext->codec_id);
      |                     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                         |
      |                                         const AVCodec*
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp: In member function ‘void ffmpegthumbnailer::MovieDecoder::initializeFilterGraph(const AVRational&, const string&, bool)’:
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp:392:99: warning: ‘AVBufferSinkParams* av_buffersink_params_alloc()’ is deprecated [-Wdeprecated-declarations]
  392 |     std::unique_ptr<AVBufferSinkParams, decltype(del)> buffersinkParams(av_buffersink_params_alloc(), del);
      |                                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp:32:
/usr/include/libavfilter/buffersink.h:112:21: note: declared here
  112 | AVBufferSinkParams *av_buffersink_params_alloc(void);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp:394:5: error: ‘avfilter_register_all’ was not declared in this scope
  394 |     avfilter_register_all();
      |     ^~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp: In member function ‘void ffmpegthumbnailer::MovieDecoder::seek(int)’:
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp:503:69: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
  503 |     avcodec_flush_buffers(m_pFormatContext->streams[m_VideoStream]->codec);
      |                                                                     ^~~~~
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp: In member function ‘bool ffmpegthumbnailer::MovieDecoder::decodeVideoPacket()’:
/var/tmp/portage/media-video/ffmpegthumbnailer-2.2.2/work/ffmpegthumbnailer-2.2.2/libffmpegthumbnailer/moviedecoder.cpp:559:24: error: ‘avcodec_decode_video2’ was not declared in this scope; did you mean ‘avcodec_decode_subtitle2’?
  559 |     int bytesDecoded = avcodec_decode_video2(m_pVideoCodecContext, m_pFrame, &frameFinished, m_pPacket);
      |                        ^~~~~~~~~~~~~~~~~~~~~
      |                        avcodec_decode_subtitle2


Reproducible: Always
Comment 1 Kobboi 2022-02-28 20:55:45 UTC
Created attachment 766067 [details]
build.log.gz
Comment 2 Kobboi 2022-02-28 20:55:47 UTC
Created attachment 766068 [details]
emerge-info.txt
Comment 3 Kobboi 2022-02-28 20:56:03 UTC
Compiles fine with ffmpeg-4.4.1
Comment 4 Alexis Ballier gentoo-dev 2022-03-12 13:09:05 UTC
commit 564304e8f9ed045fd252214d4433dc8f6aca18f4
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Mon Feb 28 11:05:23 2022 +0100

    media-video/ffmpegthumbnailer: ffmpeg5 fixes
    
    from upstream
    
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Alexis Ballier <aballier@gentoo.org>