Skip to content
New issue

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

Add compatibility with FFMPEG 7.0 #756

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

eclipseo
Copy link
Contributor

@eclipseo eclipseo commented May 3, 2024

FFMPEG 7 removed the deprecated channels inf favor of ch_layout.

This has not been tested beside building.

@eclipseo eclipseo force-pushed the fix_for_ffmpeg7 branch 6 times, most recently from 06d7dae to 16e675d Compare May 9, 2024 07:44
@mickelson
Copy link
Owner

mickelson commented May 11, 2024

Hi there, thanks for this!

I'm getting the following error when I try to compile your PR:

$ make -j8
flags: -std=c++11  -Wl,--export-dynamic -I/usr/include/freetype2 -I/usr/include/libpng16 -DDATA_PATH=\"/usr/local/share/attract/\" -O2 -DNDEBUG -Iextlibs/audio/include -D__STDC_CONSTANT_MACROS -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -I/usr/include/AL -Iextlibs/squirrel/include -Iextlibs/sqrat/include -Iextlibs/nowide -Iextlibs/nvapi -Iextlibs/rapidjson/include -Iextlibs/gameswf -DUSE_XLIB -DUSE_XINERAMA -DFE_HWACCEL_VDPAU -DUSE_FONTCONFIG -DUSE_LIBARCHIVE -DUSE_LIBCURL
Compiling obj/media.o...
src/media.cpp: In member function ‘void FeVideoImp::video_thread()’:
src/media.cpp:788:76: error: ‘AVFrame’ {aka ‘struct AVFrame’} has no member named ‘duration’; did you mean ‘pkt_duration’?
  788 |                                    prev_duration = raw_frame->duration;
      |                                                               ^~~~~~~~
      |                                                               pkt_duration
make: *** [Makefile:507: obj/media.o] Error 1


My FFmpeg versions are: avcodec 58.134.100 / avformat 58.76.100 / swscale 5.9.100 / avutil 56.70.100 / swresample 3.9.100

channel_layout has been replace with ch_layout
@eclipseo
Copy link
Contributor Author

Added:

#define HAVE_DURATION (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(58, 2, 100))

@mickelson mickelson merged commit 6ab07d2 into mickelson:master Jun 21, 2024
@mickelson
Copy link
Owner

works for me! thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants