Skip to content

Commit 6ec8f23

Browse files
mondainCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 456af4c commit 6ec8f23

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/live_dash_ingest.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,14 @@ LiveDashIngestSession::LiveDashIngestSession(std::size_t queue_depth)
286286

287287
void LiveDashIngestSession::ingest(std::string path, std::span<const std::uint8_t> bytes) {
288288
std::lock_guard<std::mutex> lock(mutex_);
289-
PathState& path_state = paths_[path];
289+
auto it = paths_.find(path);
290+
if (it == paths_.end()) {
291+
if (tracks_frozen_) {
292+
return;
293+
}
294+
it = paths_.emplace(path, PathState{}).first;
295+
}
296+
PathState& path_state = it->second;
290297
path_state.reader.append(bytes.data(), bytes.size());
291298
while (std::optional<StreamingBoxResult> box = path_state.reader.next_box()) {
292299
process_box_locked(path_state, path, *box);

0 commit comments

Comments
 (0)