diff --git a/plugins/win-dshow/win-dshow.cpp b/plugins/win-dshow/win-dshow.cpp index 449579d76..53c36c03d 100644 --- a/plugins/win-dshow/win-dshow.cpp +++ b/plugins/win-dshow/win-dshow.cpp @@ -278,6 +278,7 @@ struct DShowInput { void OnEncodedAudioData(enum AVCodecID id, unsigned char *data, size_t size, long long ts); + void OnReactivate(); void OnVideoData(const VideoConfig &config, unsigned char *data, size_t size, long long startTime, long long endTime, long rotation); @@ -522,6 +523,11 @@ void DShowInput::OnEncodedVideoData(enum AVCodecID id, unsigned char *data, } } +void DShowInput::OnReactivate() +{ + SetActive(true); +} + void DShowInput::OnVideoData(const VideoConfig &config, unsigned char *data, size_t size, long long startTime, long long endTime, long rotation) @@ -958,6 +964,8 @@ bool DShowInput::UpdateVideoConfig(obs_data_t *settings) placeholders::_1, placeholders::_2, placeholders::_3, placeholders::_4, placeholders::_5, placeholders::_6); + videoConfig.reactivateCallback = + std::bind(&DShowInput::OnReactivate, this); videoConfig.format = videoConfig.internalFormat;