Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure with ffmpeg-5.0 #2

Open
mgorny opened this issue Jan 21, 2023 · 1 comment
Open

Build failure with ffmpeg-5.0 #2

mgorny opened this issue Jan 21, 2023 · 1 comment

Comments

@mgorny
Copy link

mgorny commented Jan 21, 2023

From https://bugs.gentoo.org/834408:

svdrpc.cpp: In member function ‘bool cSVDRPC::CmdQuit()’:
svdrpc.cpp:247:11: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  247 |   asprintf(&Option,"Quit\r\n");
      |   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
svdrpc.cpp: In function ‘void noadMsg(const char*, const char*)’:
svdrpc.cpp:277:13: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  277 |     asprintf(&baseName,"mesg %s %s",msg,vend+1);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
svdrpc.cpp:279:13: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  279 |     asprintf(&baseName,"mesg %s %s",msg, filename);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
svdrpc.cpp:285:11: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  285 |   asprintf(&cp,"%s\r\n",baseName);
      |   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
tools.cpp: In function ‘const char* AddDirectory(const char*, const char*)’:
tools.cpp:249:11: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  249 |   asprintf(&buf, "%s/%s", DirName && *DirName ? DirName : ".", FileName);
      |   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools.cpp: In function ‘bool RemoveEmptyDirectories(const char*, bool)’:
tools.cpp:334:17: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  334 |         asprintf(&buffer, "%s/%s", DirName, e->d_name);
      |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools.cpp: In function ‘bool SpinUpDisk(const char*)’:
tools.cpp:401:15: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  401 |       asprintf(&buf, "%s/vdr-%06d", *FileName ? FileName : ".", n);
      |       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools.cpp:403:15: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  403 |       asprintf(&buf, "%s.vdr-%06d", FileName, n);
      |       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools.cpp:413:15: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  413 |         system("sync");
      |         ~~~~~~^~~~~~~~
tools.cpp: In function ‘int make_pidfile(const char*)’:
tools.cpp:943:8: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  943 |   write(pidf,pidfilename,strlen(pidfilename));
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools.cpp: In function ‘pid_t processInfo(const char*)’:
tools.cpp:973:13: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  973 |     asprintf(&cmd,"ps -p %s -o start,time,cmd --no-heading",buffer);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ffmpeg_decoder.cpp: In member function ‘virtual int FFMPegDecoder::decoder_init()’:
ffmpeg_decoder.cpp:153:9: error: ‘av_register_all’ was not declared in this scope
  153 |         av_register_all();
      |         ^~~~~~~~~~~~~~~
ffmpeg_decoder.cpp: In member function ‘virtual int FFMPegDecoder::openFile(cFileName*, cNoadIndexFile*)’:
ffmpeg_decoder.cpp:210:83: error: invalid conversion from ‘AVCodec**’ to ‘const AVCodec**’ [-fpermissive]
  210 | av_find_best_stream(pFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, &pCodec, 0);
      |                                                             ^~~~~~~
      |                                                             |
      |                                                             AVCodec**

In file included from ffmpeg_decoder.h:10,
                 from ffmpeg_decoder.cpp:1:
/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,
      |                         ~~~~~~~~~~~~~~~~^~~~~~~~~~~
ffmpeg_decoder.cpp:249:36: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
  249 |         pCodec=avcodec_find_decoder(pCodecPar->codec_id);
      |                ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
      |                                    |
      |                                    const AVCodec*
audiotools.cpp: In function ‘void initAVCodec()’:
audiotools.cpp:99:3: error: ‘avcodec_register_all’ was not declared in this scope
   99 |   avcodec_register_all();
      |   ^~~~~~~~~~~~~~~~~~~~
audiotools.cpp:105:31: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
  105 |   codec = avcodec_find_decoder(AV_CODEC_ID_MP3);
      |           ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
      |                               |
      |                               const AVCodec*
@bacardischmal
Copy link

bacardischmal commented Mar 28, 2024

bump, still the same issue

now start "make" to build noad
 and "make install" to install noad
>>> Source configured.
>>> Compiling source in /var/tmp/portage/media-video/noad-0.8.8/work/noad-0.8.8 ...
make -j3
make  all-am
make[1]: Entering directory '/var/tmp/portage/media-video/noad-0.8.8/work/noad-0.8.8'
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I.   -DUSE_AVIOCONTEXT -D__STDC_CONSTANT_MACROS  -D_GNU_SOURCE -DFFMPEGDECODING   -DUSE_FFMPEG  -O2 -march=native -pipe -fomit-frame-pointer -c -o audiotools.o audiotools.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I.   -DUSE_AVIOCONTEXT -D__STDC_CONSTANT_MACROS  -D_GNU_SOURCE -DFFMPEGDECODING   -DUSE_FFMPEG  -O2 -march=native -pipe -fomit-frame-pointer -c -o cchecklogo.o cchecklogo.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I.   -DUSE_AVIOCONTEXT -D__STDC_CONSTANT_MACROS  -D_GNU_SOURCE -DFFMPEGDECODING   -DUSE_FFMPEG  -O2 -march=native -pipe -fomit-frame-pointer -c -o ccontrol.o ccontrol.cpp
audiotools.cpp: In function ‘void initAVCodec()’:
audiotools.cpp:99:3: error: ‘avcodec_register_all’ was not declared in this scope
   99 |   avcodec_register_all();
      |   ^~~~~~~~~~~~~~~~~~~~
audiotools.cpp:105:31: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
  105 |   codec = avcodec_find_decoder(AV_CODEC_ID_MP3);
      |           ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
      |                               |
      |                               const AVCodec*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants