Skip to content

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

@dreirund

Description

@dreirund

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions