spek icon indicating copy to clipboard operation
spek copied to clipboard

libavcodec error on make.

Open jnaviask opened this issue 3 years ago • 1 comments

Running Ubuntu 21.04 with gcc version 10.3.0 and libavcodec.so.58.91.100.

./configure goes okay but when I run make, I get the following

spek-audio.cc: In constructor ‘AudioFileImpl::AudioFileImpl(AudioError, AVFormatContext*, int, const string&, int, int, int, int, double, bool, int, bool)’:
spek-audio.cc:202:19: error: ‘avcodec_alloc_frame’ was not declared in this scope; did you mean ‘avcodec_send_frame’?
  202 |     this->frame = avcodec_alloc_frame();
      |                   ^~~~~~~~~~~~~~~~~~~
      |                   avcodec_send_frame
spek-audio.cc: In destructor ‘virtual AudioFileImpl::~AudioFileImpl()’:
spek-audio.cc:218:9: error: ‘avcodec_free_frame’ was not declared in this scope; did you mean ‘avcodec_send_frame’?
  218 |         avcodec_free_frame(&this->frame);
      |         ^~~~~~~~~~~~~~~~~~
      |         avcodec_send_frame
spek-audio.cc: In member function ‘virtual int AudioFileImpl::read()’:
spek-audio.cc:258:13: error: ‘avcodec_get_frame_defaults’ was not declared in this scope; did you mean ‘avcodec_get_frame_class’?
  258 |             avcodec_get_frame_defaults(this->frame);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |             avcodec_get_frame_class

Maybe incompatible with version 58? I see v53 is the minimum declared in the configure file.

jnaviask avatar Nov 10 '21 16:11 jnaviask

Are you compiling master branch? It was fixed in ee8bc49ed4a93a14a933ecb0eebfe424111f8413.

danadam avatar Dec 13 '21 04:12 danadam

This should be fixed in the new release.

alexkay avatar Feb 05 '23 22:02 alexkay