hzeller / timg

A terminal image and video viewer.
GNU General Public License v2.0
1.92k stars 73 forks source link

Compile error with ffmpeg 5 #78

Closed wilriker closed 2 years ago

wilriker commented 2 years ago

Compiling with ffmpeg 5.x results in

timg-1.4.3/src/video-display.cc: In member function ‘virtual bool timg::VideoLoader::LoadAndScale(const timg::DisplayOptions&, int, int)’:
timg-1.4.3/src/video-display.cc:163:40: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
  163 |         av_codec = avcodec_find_decoder(codec_parameters->codec_id);
      |                    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                        |
      |                                        const AVCodec*
hzeller commented 2 years ago

I recently changed this to be const, Did you build from head or the slightly before 1.4.3 release ?

hzeller commented 2 years ago

(Also see #74)

wilriker commented 2 years ago

It was built with 1.4.3. Release. This has been released on 2022-01-08 and the change you mentioned only was on 2022-02-06 so this cannot be part of that release.

So I am waiting for a new release.

(BTW: I am the maintainer of the AUR package and get notified about new releases so I can update the package).

hzeller commented 2 years ago

Created new release 1.4.4 that contains the latest changes https://github.com/hzeller/timg/releases/tag/v1.4.4

wilriker commented 2 years ago

Thanks! I can confirm it's working again. :+1: