Extract common code out into kdm_for_screen()
[dcpomatic.git] / src / wx / player_information.cc
index c0821510ceb54d56b2be333f2e3f77e8c70eb0be..9a569c00cc127226dd0d3c6c3db76cef9df1d812 100644 (file)
@@ -90,7 +90,13 @@ PlayerInformation::periodic_update ()
 {
        shared_ptr<FilmViewer> fv = _viewer.lock ();
        if (fv) {
-               checked_set (_dropped, wxString::Format(_("Dropped frames: %d"), fv->dropped()));
+               wxString s = wxString::Format(_("Dropped frames: %d"), fv->dropped() + fv->errored());
+               if (fv->errored() == 1) {
+                       s += wxString::Format(_(" (%d error)"), fv->errored());
+               } else if (fv->errored() > 1) {
+                       s += wxString::Format(_(" (%d errors)"), fv->errored());
+               }
+               checked_set (_dropped, s);
        }
 }
 
@@ -153,8 +159,8 @@ PlayerInformation::triggered_update ()
 
        string const len = String::compose(
                wx_to_std(_("Length: %1 (%2 frames)")),
-               time_to_hmsf(dcp->full_length(), lrint(*vfr)),
-               dcp->full_length().frames_round(*vfr)
+               time_to_hmsf(dcp->full_length(fv->film()), lrint(*vfr)),
+               dcp->full_length(fv->film()).frames_round(*vfr)
                );
 
        checked_set (_dcp[r++], std_to_wx(len));