mickelson / attract

A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
http://attractmode.org
GNU General Public License v3.0
393 stars 115 forks source link

Fix build issue with recent ffmpeg #701

Closed davide125 closed 2 years ago

davide125 commented 2 years ago

Recent versions of ffmpeg expect a const AVCodec ** type for av_find_best_stream (e.g. see https://ffmpeg.org/doxygen/trunk/group__lavf__decoding.html#ga8d4609a8f685ad894c1503ffd1b610b4). Without this change the build fails with:

src/media.cpp: In member function ‘bool FeMedia::open(const std::string&, const std::string&, sf::Texture*)’:
src/media.cpp:1066:33: error: invalid conversion from ‘AVCodec**’ to ‘const AVCodec**’ [-fpermissive]
 1066 |                         -1, -1, &dec, 0 );
      |                                 ^~~~
      |                                 |
      |                                 AVCodec**

Tested with ffmpeg 5.0 on Linux.

mickelson commented 2 years ago

Hi thanks, I merged your pull request here: https://github.com/mickelson/attract/commit/c27312be47dfb7370456a878fc6284883650b7f2

I'm not sure why its not showing up as merged here