encoders/ffmpeg: Support proper settings migration

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2021-12-02 17:05:05 +01:00
parent 132c58632e
commit b151a44790
2 changed files with 8 additions and 0 deletions

View file

@ -970,6 +970,12 @@ void ffmpeg_factory::get_defaults2(obs_data_t* settings)
}
}
void ffmpeg_factory::migrate(obs_data_t* data, uint64_t version)
{
if (_handler)
_handler->migrate(data, version, _avcodec, nullptr);
}
static bool modified_keyframes(obs_properties_t* props, obs_property_t*, obs_data_t* settings) noexcept
try {
bool is_seconds = obs_data_get_int(settings, ST_KEY_KEYFRAMES_INTERVALTYPE) == 0;

View file

@ -143,6 +143,8 @@ namespace streamfx::encoder::ffmpeg {
void get_defaults2(obs_data_t* data) override;
void migrate(obs_data_t* data, uint64_t version) override;
obs_properties_t* get_properties2(instance_t* data) override;
#ifdef ENABLE_FRONTEND