We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This code uses a deprecated ffmpeg API which results in errors when compiling against ffmpeg>=5.0.
spek-audio.cc: In constructor 'Audio::Audio()': spek-audio.cc:63:5: error: 'av_register_all' was not declared in this scope 63 | av_register_all(); | ^~~~~~~~~~~~~~~ spek-audio.cc: In destructor 'Audio::~Audio()': spek-audio.cc:69:5: error: 'av_lockmgr_register' was not declared in this scope 69 | av_lockmgr_register(nullptr); | ^~~~~~~~~~~~~~~~~~~ CXX libspek_a-spek-utils.o spek-audio.cc: In member function 'std::unique_ptr<AudioFile> Audio::open(const string&, int)': spek-audio.cc:114:49: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive] 114 | codec = avcodec_find_decoder_by_name("mp1float"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ | | | const AVCodec* spek-audio.cc:117:49: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive] 117 | codec = avcodec_find_decoder_by_name("mp2float"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ | | | const AVCodec* spek-audio.cc:120:49: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive] 120 | codec = avcodec_find_decoder_by_name("mp3float"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ | | | const AVCodec* spek-audio.cc:123:49: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive] 123 | codec = avcodec_find_decoder_by_name("mp3adufloat"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ | | | const AVCodec* spek-audio.cc:126:49: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive] 126 | codec = avcodec_find_decoder_by_name("mp3on4float"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ | | | const AVCodec* spek-audio.cc:129:41: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive] 129 | codec = avcodec_find_decoder(codecpar->codec_id); | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ | | | const AVCodec* spek-audio.cc: In constructor 'AudioFileImpl::AudioFileImpl(AudioError, AVFormatContext*, AVCodecContext*, int, const string&, int, int, int, int, int, double)': spek-audio.cc:222:33: warning: 'void av_init_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations] 222 | av_init_packet(&this->packet); | ^ In file included from /usr/include/libavformat/avformat.h:316, from spek-audio.cc:4: /usr/include/libavcodec/packet.h:506:6: note: declared here 506 | void av_init_packet(AVPacket *pkt); | ^~~~~~~~~~~~~~ -- spek-audio.cc: In member function 'virtual int AudioFileImpl::read()': spek-audio.cc:273:23: error: 'avcodec_decode_audio4' was not declared in this scope; did you mean 'avcodec_decode_subtitle2'? 273 | int len = avcodec_decode_audio4( | ^~~~~~~~~~~~~~~~~~~~~ | avcodec_decode_subtitle2
The text was updated successfully, but these errors were encountered:
Replace deprecated FFmpeg APIs to support FFmpeg 5.x
5d9b551
No branches or pull requests
This code uses a deprecated ffmpeg API which results in errors when compiling against ffmpeg>=5.0.
The text was updated successfully, but these errors were encountered: