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 fails with AudioDecoderFFmpeg.cpp:103:15: error: ‘avcodec_decode_audio4’ was not declared in this scope; did you mean ‘avcodec_decode_subtitle2’? and AudioDecoderFFmpeg.cpp:103:15: error: ‘avcodec_decode_audio4’ was not declared in this scope; did you mean ‘avcodec_decode_subtitle2’? #1426

Open
dreirund opened this issue May 7, 2023 · 7 comments

Comments

@dreirund
Copy link

dreirund commented May 7, 2023

QtAV, Qt version and platform

  • QtAV: Latest checkout from this git repository, commit ID: fdc613d from 2023-02-26
  • Qt: `qt5ct
  • Platform: Artix GNU/Linux (rolling release)
  • Compiler: GCC; gcc --version | head -n1: gcc (GCC) 13.1.1 20230429

Reproduction steps

Build this software according to ↗ this PKGBUILD

Expected behavior

Clean build

Actual behavior

Fails to build for me with
AudioDecoderFFmpeg.cpp:103:15: error: ‘avcodec_decode_audio4’ was not declared in this scope; did you mean ‘avcodec_decode_subtitle2’?
and
AudioDecoderFFmpeg.cpp:148:37: error: ‘AVFrame’ {aka ‘struct AVFrame’} has no member named ‘pkt_pts’; did you mean ‘pkt_dts’?:

[...]
[ 19%] Building CXX object src/CMakeFiles/QtAV.dir/codec/audio/AudioDecoderFFmpeg.cpp.o
[...]
/tmp/makepkg/build/qtav-git/src/QtAV/src/codec/audio/AudioDecoderFFmpeg.cpp:103:15: error: ‘avcodec_decode_audio4’ was not declared in this scope; did you mean ‘avcodec_decode_subtitle2’?
  103 |         ret = avcodec_decode_audio4(d.codec_ctx, d.frame, &got_frame_ptr, &eofpkt);
      |               ^~~~~~~~~~~~~~~~~~~~~
      |               avcodec_decode_subtitle2
/tmp/makepkg/build/qtav-git/src/QtAV/src/codec/audio/AudioDecoderFFmpeg.cpp:106:15: error: ‘avcodec_decode_audio4’ was not declared in this scope; did you mean ‘avcodec_decode_subtitle2’?
  106 |         ret = avcodec_decode_audio4(d.codec_ctx, d.frame, &got_frame_ptr, (AVPacket*)packet.asAVPacket());
      |               ^~~~~~~~~~~~~~~~~~~~~
      |               avcodec_decode_subtitle2
[...]
/tmp/makepkg/build/qtav-git/src/QtAV/src/codec/audio/AudioDecoderFFmpeg.cpp:148:37: error: ‘AVFrame’ {aka ‘struct AVFrame’} has no member named ‘pkt_pts’; did you mean ‘pkt_dts’?
  148 |     f.setTimestamp((double)d.frame->pkt_pts/1000.0);
      |                                     ^~~~~~~
      |                                     pkt_dts
make[2]: *** [src/CMakeFiles/QtAV.dir/build.make:455: src/CMakeFiles/QtAV.dir/codec/audio/AudioDecoderFFmpeg.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:201: src/CMakeFiles/QtAV.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Log file

N/A, since I cannot build at all.

Sample files (optional)

N/A, since I cannot build at all.

@wang-bin
Copy link
Owner

wang-bin commented May 8, 2023

they are removed in ffmpeg 6.0. you have to use new apis

@dreirund
Copy link
Author

dreirund commented May 8, 2023 via email

@wang-bin
Copy link
Owner

wang-bin commented May 8, 2023

Yes, but i'm not maintaining this project, you have to use old ffmpeg version or modify yourself

@dreirund
Copy link
Author

dreirund commented May 8, 2023 via email

@wang-bin
Copy link
Owner

wang-bin commented May 8, 2023

no one. I'm working on other projects, this project is dead.

@dreirund
Copy link
Author

dreirund commented May 8, 2023 via email

@wang-bin
Copy link
Owner

wang-bin commented May 9, 2023

readme is updated

freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Jul 17, 2023
QtAV is broken with FFmpeg 6.x and has been abandoned by the original
author [1]. The last release was 6 years ago.

No ports depend on this, so EXPIRATION_DATE has been set to one month
from now.

[1] wang-bin/QtAV#1426 (comment)
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