diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-01-13 22:49:51 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-01-14 00:24:46 +0000 |
| commit | 97ce603137dace8e85fe72975644c220d7fa9ae8 (patch) | |
| tree | 41828939af011b0af8241e4bacf195d34035344e /src/lib | |
| parent | 66ce3b83877b3d7b95f6cd424fc9516e0bf79aa9 (diff) | |
Fix crash when unsetting forced video frame rates in the timing panel.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/content.cc | 12 | ||||
| -rw-r--r-- | src/lib/content.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc index 40f74fe9a..7b1e630a6 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -48,6 +48,7 @@ using std::vector; using std::max; using std::pair; using boost::shared_ptr; +using boost::optional; using dcp::raw_convert; using dcp::locale_convert; @@ -361,6 +362,17 @@ Content::set_video_frame_rate (double r) signal_changed (ContentProperty::VIDEO_FRAME_RATE); } +void +Content::unset_video_frame_rate () +{ + { + boost::mutex::scoped_lock lm (_mutex); + _video_frame_rate = optional<double>(); + } + + signal_changed (ContentProperty::VIDEO_FRAME_RATE); +} + double Content::active_video_frame_rate () const { diff --git a/src/lib/content.h b/src/lib/content.h index f0a2d0bdb..836a3bd77 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -166,6 +166,7 @@ public: } void set_video_frame_rate (double r); + void unset_video_frame_rate (); double active_video_frame_rate () const; |
