evanpurkhiser/keyfinder-cli

Ubuntu 14.04.1 build problem

Closed this issue · 3 comments

$ g++ -std=c++11 -Wall -lkeyfinder -lboost_system -lavcodec -lavformat -lavutil -lavresample -o keyfinder-cli keyfinder_cli.cpp -I. -I/usr/include -I/usr/local/include -L/usr/lib -L/usr/local/lib -lavresample
keyfinder_cli.cpp: In function ‘void fill_audio_data(const char*, KeyFinder::AudioData&)’:
keyfinder_cli.cpp:162:57: error: ‘av_frame_alloc’ was not declared in this scope
     std::shared_ptr<AVFrame> audio_frame(av_frame_alloc(), &av_free);
                                                         ^
keyfinder_cli.cpp:220:100: error: ‘avresample_convert_frame’ was not declared in this scope
             if (avresample_convert_frame(resample_ctx_ptr, converted_frame.get(), audio_frame.get()) < 0)

What version of ffmpeg do you have installed?

Ubuntu started shipping the libav fork instead of FFmpeg in recent releases.
Libav: 6:9.16-0ubuntu0.14.04.1

Looks like libav 9 may be a little bit too old. av_frame_alloc was added in 10 at least. hmm