mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-19 20:32:15 +02:00
deps/media-playback: In check for key-frame, use new FFmpeg 6.1 API
Fixes for using FFmpeg 6.1 due to deprecations. Uses `#if` macros to allow builds for using older versions of FFmpeg. AVFrame.key_frame was replaced with a flag in AVFrame.flags. The commit adding the flag is [1] in FFmpeg's repository, and the deprecation is in commit [2]. In summary of the "key_frame" change, AVFrame.key_frame is deprecated, and AVFrame.flags indicates with a bit flag if it is a key frame (with the enum/defined AV_FRAME_FLAG_KEY). [1]: avutil/frame: add a keyframe flag to AVFramecc11191fda
[2]: avutil/frame: deprecate key_frame3e06f6f040
This commit is contained in:
parent
4b5be75c7e
commit
6e080a6806
5
deps/media-playback/media-playback/media.c
vendored
5
deps/media-playback/media-playback/media.c
vendored
@ -504,7 +504,12 @@ void mp_media_next_video(mp_media_t *m, bool preload)
|
||||
}
|
||||
|
||||
if (!m->is_local_file && !d->got_first_keyframe) {
|
||||
|
||||
#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(58, 29, 100)
|
||||
if (!f->key_frame)
|
||||
#else
|
||||
if (!(f->flags & AV_FRAME_FLAG_KEY))
|
||||
#endif
|
||||
return;
|
||||
|
||||
d->got_first_keyframe = true;
|
||||
|
Loading…
Reference in New Issue
Block a user