diff --git a/src/video_provider_bestsource.cpp b/src/video_provider_bestsource.cpp index 2d7c6c952..c7412a4e0 100644 --- a/src/video_provider_bestsource.cpp +++ b/src/video_provider_bestsource.cpp @@ -137,8 +137,11 @@ BSVideoProvider::BSVideoProvider(agi::fs::path const& filename, std::string cons if (frame == nullptr) { throw VideoOpenError("Couldn't read frame!"); } - +#if (LIBAVUTIL_VERSION_MAJOR == 58 && LIBAVUTIL_VERSION_MINOR >= 7) || LIBAVUTIL_VERSION_MAJOR >= 59 + if (frame->GetAVFrame()->flags & AV_FRAME_FLAG_KEY) { +#else if (frame->GetAVFrame()->key_frame) { +#endif Keyframes.push_back(n); }