summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-25 02:09:11 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-25 02:09:11 +0100
commit30437007ba00ab45bdbdb490b10e49ea2570636a (patch)
treedfbe16398097638f0e1234e831dd66f4aed03f08
parent7d344b1ecad24ee573c9da06d454e696a8149e5a (diff)
Try to fix range UI a little.
-rw-r--r--ChangeLog2
-rw-r--r--src/lib/film.cc10
-rw-r--r--src/lib/film.h1
-rw-r--r--src/wx/film_editor.cc7
4 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fa2e67db1..47273963a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,8 @@
* Basic support for selection of audio
and subtitle streams.
+ * Fixes for audio/video sync in some cases.
+
2012-10-09 Carl Hetherington <cth@carlh.net>
* Version 0.55 released.
diff --git a/src/lib/film.cc b/src/lib/film.cc
index e8a23377d..b92d8d2fa 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -1076,6 +1076,16 @@ Film::set_dcp_frames (int f)
}
void
+Film::unset_dcp_frames ()
+{
+ {
+ boost::mutex::scoped_lock lm (_state_mutex);
+ _dcp_frames = boost::none;
+ }
+ signal_changed (DCP_FRAMES);
+}
+
+void
Film::set_dcp_trim_action (TrimAction a)
{
{
diff --git a/src/lib/film.h b/src/lib/film.h
index 131891706..3eff9e3da 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -349,6 +349,7 @@ public:
void set_filters (std::vector<Filter const *>);
void set_scaler (Scaler const *);
void set_dcp_frames (int);
+ void unset_dcp_frames ();
void set_dcp_trim_action (TrimAction);
void set_dcp_ab (bool);
void set_audio_stream (int);
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc
index 91db579c5..3e5079cc5 100644
--- a/src/wx/film_editor.cc
+++ b/src/wx/film_editor.cc
@@ -776,7 +776,12 @@ FilmEditor::change_dcp_range_clicked (wxCommandEvent &)
void
FilmEditor::dcp_range_changed (int frames, TrimAction action)
{
- _film->set_dcp_frames (frames);
+ if (frames == 0) {
+ _film->unset_dcp_frames ();
+ } else {
+ _film->set_dcp_frames (frames);
+ }
+
_film->set_dcp_trim_action (action);
}