From: Carl Hetherington Date: Thu, 25 Oct 2012 01:09:11 +0000 (+0100) Subject: Try to fix range UI a little. X-Git-Tag: v2.0.48~1630 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=30437007ba00ab45bdbdb490b10e49ea2570636a;p=dcpomatic.git Try to fix range UI a little. --- 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 * 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 @@ -1075,6 +1075,16 @@ Film::set_dcp_frames (int f) signal_changed (DCP_FRAMES); } +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); 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); }