bestsource: Update ffmpeg API usage for keyframes
This commit is contained in:
parent
0c057ebddb
commit
167b4add50
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue