Skip to content

Commit

Permalink
bestsource: Update ffmpeg API usage for keyframes
Browse files Browse the repository at this point in the history
  • Loading branch information
0tkl authored and arch1t3cht committed Dec 27, 2023
1 parent 0c057eb commit 167b4ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/video_provider_bestsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 167b4ad

Please sign in to comment.