summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-20 22:30:36 +0100
committerCarl Hetherington <cth@carlh.net>2020-01-08 21:56:47 +0100
commit7da4fe1c2de3c184a22dbcd1195fc6cffb83ac51 (patch)
tree0e4cfa9363c3130260b290f4903fa9bc14195010 /src
parent89780827d5d6ec9127eae0108d10f71dc79d1a72 (diff)
Small re-use cleanup.
Diffstat (limited to 'src')
-rw-r--r--src/wx/film_viewer.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 31093cb0a..c1d04be03 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -567,12 +567,7 @@ FilmViewer::audio_time () const
DCPTime
FilmViewer::time () const
{
- if (_audio.isStreamRunning ()) {
- return DCPTime::from_seconds (const_cast<RtAudio*>(&_audio)->getStreamTime ()) -
- DCPTime::from_frames (average_latency(), _film->audio_frame_rate());
- }
-
- return _video_view->position();
+ return audio_time().get_value_or(_video_view->position());
}
int