Skip to content

Commit 4c19c84

Browse files
committed
osn-input: add name of Named input to debug message
1 parent 91156b3 commit 4c19c84

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

obs-studio-server/source/osn-input.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,10 @@ void osn::Input::FromName(void *data, const int64_t id, const std::vector<ipc::v
210210
{
211211
obs_source_t *source = obs_get_source_by_name(args[0].value_str.c_str());
212212
if (!source) {
213-
PRETTY_ERROR_RETURN(ErrorCode::NotFound, "Named input could not be found.");
213+
std::string missing_name(args[0].value_str);
214+
std::stringstream ss;
215+
ss << "Named input (" << missing_name << ") could not be found.";
216+
PRETTY_ERROR_RETURN(ErrorCode::NotFound, ss.str().c_str());
214217
}
215218

216219
uint64_t uid = osn::Source::Manager::GetInstance().find(source);
@@ -666,4 +669,4 @@ void osn::Input::GetMediaState(void *data, const int64_t id, const std::vector<i
666669
rval.push_back(ipc::value((uint64_t)ErrorCode::Ok));
667670
rval.push_back(ipc::value(obs_source_media_get_state(input)));
668671
AUTO_DEBUG;
669-
}
672+
}

0 commit comments

Comments
 (0)