mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-24 04:15:11 +00:00
source/mirror: Fix rare out-of-order lock on source
Occasionally, mostly due to other sources rebuilding their UI, an out-of-order lock freeze can be observed with Source Mirror. This is unwanted, so we need to move the freezing logic into a place where freezing shouldn't happen. Fixes #228 Actually fixes #61
This commit is contained in:
parent
2fb2b07990
commit
40920204b5
1 changed files with 4 additions and 7 deletions
|
@ -126,13 +126,7 @@ void mirror_instance::save(obs_data_t* data)
|
|||
}
|
||||
}
|
||||
|
||||
void mirror_instance::video_tick(float_t time)
|
||||
{
|
||||
if (_source) {
|
||||
_source_size.first = obs_source_get_width(_source.get());
|
||||
_source_size.second = obs_source_get_height(_source.get());
|
||||
}
|
||||
}
|
||||
void mirror_instance::video_tick(float_t time) {}
|
||||
|
||||
void mirror_instance::video_render(gs_effect_t* effect)
|
||||
{
|
||||
|
@ -146,6 +140,9 @@ void mirror_instance::video_render(gs_effect_t* effect)
|
|||
obs_source_get_name(_source.get())};
|
||||
#endif
|
||||
|
||||
_source_size.first = obs_source_get_width(_source.get());
|
||||
_source_size.second = obs_source_get_height(_source.get());
|
||||
|
||||
obs_source_video_render(_source.get());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue