Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
obs/source-tracker: Fix leaked source references
Browse files Browse the repository at this point in the history
This functionality broke at some point in the past without anyone noticing, resulting in most dropdowns that rely on this functionality being blank.

Fixes #1025
  • Loading branch information
Xaymar committed Feb 16, 2023
1 parent fcb441b commit 8bb4909
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 165 deletions.
4 changes: 2 additions & 2 deletions source/filters/filter-blur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -863,13 +863,13 @@ obs_properties_t* blur_factory::get_properties2(blur_instance* data)
OBS_COMBO_FORMAT_STRING);
obs_property_list_add_string(p, "", "");
obs::source_tracker::get()->enumerate(
[&p](std::string name, obs_source_t*) {
[&p](std::string name, ::streamfx::obs::source) {
obs_property_list_add_string(p, std::string(name + " (Source)").c_str(), name.c_str());
return false;
},
obs::source_tracker::filter_video_sources);
obs::source_tracker::get()->enumerate(
[&p](std::string name, obs_source_t*) {
[&p](std::string name, ::streamfx::obs::source) {
obs_property_list_add_string(p, std::string(name + " (Scene)").c_str(), name.c_str());
return false;
},
Expand Down
4 changes: 2 additions & 2 deletions source/filters/filter-dynamic-mask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,15 +754,15 @@ obs_properties_t* dynamic_mask_factory::get_properties2(dynamic_mask_instance* d
OBS_COMBO_FORMAT_STRING);
obs_property_list_add_string(p, "", "");
obs::source_tracker::get()->enumerate(
[&p](std::string name, obs_source_t*) {
[&p](std::string name, ::streamfx::obs::source) {
std::stringstream sstr;
sstr << name << " (" << D_TRANSLATE(S_SOURCETYPE_SOURCE) << ")";
obs_property_list_add_string(p, sstr.str().c_str(), name.c_str());
return false;
},
obs::source_tracker::filter_video_sources);
obs::source_tracker::get()->enumerate(
[&p](std::string name, obs_source_t*) {
[&p](std::string name, ::streamfx::obs::source) {
std::stringstream sstr;
sstr << name << " (" << D_TRANSLATE(S_SOURCETYPE_SCENE) << ")";
obs_property_list_add_string(p, sstr.str().c_str(), name.c_str());
Expand Down
4 changes: 2 additions & 2 deletions source/gfx/shader/gfx-shader-param-texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,15 @@ void streamfx::gfx::shader::texture_parameter::properties(obs_properties_t* prop
OBS_COMBO_FORMAT_STRING);
obs_property_list_add_string(p, "", "");
obs::source_tracker::get()->enumerate(
[&p](std::string name, obs_source_t*) {
[&p](std::string name, ::streamfx::obs::source) {
std::stringstream sstr;
sstr << name << " (" << D_TRANSLATE(S_SOURCETYPE_SOURCE) << ")";
obs_property_list_add_string(p, sstr.str().c_str(), name.c_str());
return false;
},
obs::source_tracker::filter_video_sources);
obs::source_tracker::get()->enumerate(
[&p](std::string name, obs_source_t*) {
[&p](std::string name, ::streamfx::obs::source) {
std::stringstream sstr;
sstr << name << " (" << D_TRANSLATE(S_SOURCETYPE_SCENE) << ")";
obs_property_list_add_string(p, sstr.str().c_str(), name.c_str());
Expand Down
Loading

0 comments on commit 8bb4909

Please sign in to comment.