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

Bug 834360

Summary: app-misc/qcma-0.4.2_pre20181227 with ffmpeg-5.0: avdecoder.h:75:13: error: ‘av_register_all’ was not declared in this scope
Product: Gentoo Linux Reporter: Kobboi <gentoo>
Component: Current packagesAssignee: Vadim A. Misbakh-Soloviov (mva) <mva>
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 831437    
Attachments: build.log.gz

Description Kobboi 2022-02-28 10:29:25 UTC
x86_64-pc-linux-gnu-g++ -c -O2 -march=znver3 -pipe -g -ggdb3 -Wno-write-strings -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -Wall -Wextra -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-include-dirs -Woverloaded-virtual -Wundef -Wno-unused -Wno-missing-field-initializers -Wno-format-nonliteral -fPIC -Wall -Wextra -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DQCMA_VER=\"0.4.2\" -DFFMPEG_ENABLED -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -I/usr/include/libusb-1.0 -I/usr/include/libxml2 -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtSql -I/usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o moc_cmaclient.o moc_cmaclient.cpp
In file included from avdecoder.cpp:21:
avdecoder.h: In constructor ‘AVDecoder::AvInit::AvInit()’:
avdecoder.h:75:13: error: ‘av_register_all’ was not declared in this scope
   75 |             av_register_all();
      |             ^~~~~~~~~~~~~~~
In file included from cmautils.cpp:23:
avdecoder.h: In constructor ‘AVDecoder::AvInit::AvInit()’:
avdecoder.h:75:13: error: ‘av_register_all’ was not declared in this scope
   75 |             av_register_all();
      |             ^~~~~~~~~~~~~~~
avdecoder.cpp: In member function ‘bool AVDecoder::loadCodec(AVDecoder::codec_type)’:
avdecoder.cpp:68:84: error: invalid conversion from ‘AVCodec**’ to ‘const AVCodec**’ [-fpermissive]
   68 | av_find_best_stream(pFormatCtx, (AVMediaType)codec, -1, -1, &av_codec, 0)) < 0) {
      |                                                             ^~~~~~~~~
      |                                                             |
      |                                                             AVCodec**

In file included from avdecoder.h:27,
                 from avdecoder.cpp:21:
/usr/include/libavformat/avformat.h:2161:41: note:   initializing argument 5 of ‘int av_find_best_stream(AVFormatContext*, AVMediaType, int, int, const AVCodec**, int)’
 2161 |                         const AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~^~~~~~~~~~~
avdecoder.cpp:73:28: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
   73 |     pCodecCtx = av_stream->codec;
      |                            ^~~~~
avdecoder.cpp: In member function ‘AVFrame* AVDecoder::getDecodedFrame(AVCodecContext*, int)’:
avdecoder.cpp:142:13: error: ‘avcodec_decode_video2’ was not declared in this scope; did you mean ‘avcodec_decode_subtitle2’?
  142 |             avcodec_decode_video2(codec_ctx, pFrame, &frame_finished, &packet);
      |             ^~~~~~~~~~~~~~~~~~~~~
      |             avcodec_decode_subtitle2
avdecoder.cpp: In member function ‘QByteArray AVDecoder::WriteJPEG(AVCodecContext*, AVFrame*, int, int)’:
avdecoder.cpp:235:35: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
  235 |     pOCodec = avcodec_find_encoder(AV_CODEC_ID_MJPEG);
      |               ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                                   |
      |                                   const AVCodec*
avdecoder.cpp:360:19: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
  360 |     av_init_packet(&pkt);
      |     ~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/libavcodec/avcodec.h:45,
                 from avdecoder.h:26,
                 from avdecoder.cpp:21:
/usr/include/libavcodec/packet.h:506:6: note: declared here
  506 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
avdecoder.cpp:366:5: error: ‘avcodec_encode_video2’ was not declared in this scope; did you mean ‘avcodec_encode_subtitle’?
  366 |     avcodec_encode_video2(pOCodecCtx, &pkt, pFrameRGB, &gotPacket);
      |     ^~~~~~~~~~~~~~~~~~~~~
      |     avcodec_encode_subtitle


Reproducible: Always
Comment 1 Kobboi 2022-02-28 10:29:42 UTC
Created attachment 765982 [details]
Comment 2 Kobboi 2022-02-28 10:29:46 UTC
Created attachment 765983 [details]
Comment 3 Kobboi 2022-02-28 10:38:13 UTC
$HOMEPAGE's "About" claims "No longer maintained"
Comment 4 Kobboi 2022-02-28 10:39:38 UTC
$HOMEPAGE's "About" claims "No longer maintained"
Comment 5 Kobboi 2022-02-28 10:40:28 UTC
I hadn't even seen the banner on top: "This repository has been archived by the owner. It is now read-only."
Comment 6 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2022-04-04 08:40:13 UTC

Sorry, I was too overburdened with work.

I already took this bug on my queue, and will fix it soon.

// by the way, yes, most Vita stuff now are either frozen or "no longer maintaned".

But as soon as my Vita alive yet, I'll try to fix that.
Comment 7 Larry the Git Cow gentoo-dev 2022-04-04 16:25:28 UTC
The bug has been referenced in the following commit(s):

commit 7953e7cfb48cea5a5e6c3ffc5b452876b4513410
Author:     Vadim Misbakh-Soloviov <>
AuthorDate: 2022-04-04 16:22:47 +0000
Commit:     Vadim Misbakh-Soloviov <>
CommitDate: 2022-04-04 16:25:19 +0000

    app-misc/qcma: fixing to support ffmpeg5
    Package-Manager: Portage-3.0.30, Repoman-3.0.1
    Signed-off-by: Vadim Misbakh-Soloviov <>

 app-misc/qcma/qcma-0.4.1.ebuild             | 6 +++++-
 app-misc/qcma/qcma-0.4.2_pre20181227.ebuild | 6 +++++-
 app-misc/qcma/qcma-9999.ebuild              | 6 +++++-
 3 files changed, 15 insertions(+), 3 deletions(-)
Comment 8 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2022-04-04 16:25:59 UTC
Btw, this function is noop since 4.0 release:

So, I added a sed-call to monkeypatch it out.