diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index dff3807b..09ed124b 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -180,7 +180,11 @@ void ffmpeg_instance::get_properties(obs_properties_t* props) obs_property_set_enabled(obs_properties_get(props, KEY_FFMPEG_GPU), false); } -void ffmpeg_instance::migrate(obs_data_t* settings, std::uint64_t version) {} +void ffmpeg_instance::migrate(obs_data_t* settings, std::uint64_t version) +{ + if (_handler) + _handler->migrate(settings, version, _codec, _context); +} bool ffmpeg_instance::update(obs_data_t* settings) { diff --git a/source/encoders/handlers/handler.hpp b/source/encoders/handlers/handler.hpp index 14c56301..3401d498 100644 --- a/source/encoders/handlers/handler.hpp +++ b/source/encoders/handlers/handler.hpp @@ -60,6 +60,8 @@ namespace streamfx::encoder::ffmpeg { virtual void get_properties(obs_properties_t* props, const AVCodec* codec, AVCodecContext* context, bool hw_encode){}; + virtual void migrate(obs_data_t* settings, std::uint64_t version, const AVCodec* codec, AVCodecContext* context){}; + virtual void update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context){}; virtual void override_update(ffmpeg_instance* instance, obs_data_t* settings){};