summaryrefslogtreecommitdiff
path: root/src/lib/dcp_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-05-09 01:33:45 +0200
committerCarl Hetherington <cth@carlh.net>2023-05-10 21:35:46 +0200
commit0f11f0c25465464b28db713cccd37d7d8de483e1 (patch)
tree415dc88b05b951f5d590d0c41b52503fd8fd3da5 /src/lib/dcp_content.cc
parentb168d211622f94a5240c945c1df03b0bed48d3bc (diff)
Allow signals to be blocked and resumed, and so make sure that a set
of content changes taken from an examiner are handled at the same time. Should fix DoM #2523.
Diffstat (limited to 'src/lib/dcp_content.cc')
-rw-r--r--src/lib/dcp_content.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc
index 231a93bd0..cad775b24 100644
--- a/src/lib/dcp_content.cc
+++ b/src/lib/dcp_content.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014-2022 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2023 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -31,6 +31,7 @@
#include "job.h"
#include "log.h"
#include "overlaps.h"
+#include "scope_guard.h"
#include "text_content.h"
#include "video_content.h"
#include <dcp/dcp.h>
@@ -213,6 +214,11 @@ DCPContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job)
bool const needed_kdm = needs_kdm ();
string const old_name = name ();
+ ContentChangeSignalDespatcher::instance()->suspend();
+ ScopeGuard sg = []() {
+ ContentChangeSignalDespatcher::instance()->resume();
+ };
+
ContentChangeSignaller cc_texts (this, DCPContentProperty::TEXTS);
ContentChangeSignaller cc_assets (this, DCPContentProperty::NEEDS_ASSETS);
ContentChangeSignaller cc_kdm (this, DCPContentProperty::NEEDS_KDM);