blob: 5bae53bbef534367ef1979ba227af8d265903f24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp
index 1bfbc32c..43b05c48 100644
--- a/source/encoders/encoder-ffmpeg.cpp
+++ b/source/encoders/encoder-ffmpeg.cpp
@@ -1045,7 +1045,7 @@ void ffmpeg_factory::get_defaults2(obs_data_t* settings)
if (_handler)
_handler->get_defaults(settings, _avcodec, nullptr, _handler->is_hardware_encoder(this));
- if ((_avcodec->capabilities & AV_CODEC_CAP_INTRA_ONLY) == 0) {
+ if ((avcodec_descriptor_get(_avcodec->id)->props & AV_CODEC_PROP_INTRA_ONLY) == 0) {
obs_data_set_default_int(settings, ST_KEY_KEYFRAMES_INTERVALTYPE, 0);
obs_data_set_default_double(settings, ST_KEY_KEYFRAMES_INTERVAL_SECONDS, 2.0);
obs_data_set_default_int(settings, ST_KEY_KEYFRAMES_INTERVAL_FRAMES, 300);
diff --git a/source/encoders/handlers/handler.cpp b/source/encoders/handlers/handler.cpp
index bb109dac..58199952 100644
--- a/source/encoders/handlers/handler.cpp
+++ b/source/encoders/handlers/handler.cpp
@@ -9,7 +9,7 @@ using namespace streamfx::encoder::ffmpeg;
bool handler::handler::has_keyframe_support(ffmpeg_factory* instance)
{
- return (instance->get_avcodec()->capabilities & AV_CODEC_CAP_INTRA_ONLY) == 0;
+ return (avcodec_descriptor_get(instance->get_avcodec()->id)->props & AV_CODEC_PROP_INTRA_ONLY) == 0;
}
bool handler::handler::is_hardware_encoder(ffmpeg_factory* instance)
|