operator bool on Time is a really bad idea; removed it and fixed lots of bugs.
[dcpomatic.git] / src / wx / properties_dialog.cc
index bdc5742d8cb4a5bd5b440dafbf019e23fdacdbaf..8c976f53ae7df64c34df2d13dd55e132ae5ba250 100644 (file)
@@ -85,10 +85,11 @@ PropertiesDialog::frames_already_encoded () const
        } catch (boost::thread_interrupted &) {
                return "";
        }
-       
-       if (_film->length()) {
+
+       uint64_t const frames = _film->length().frames (_film->video_frame_rate ());
+       if (frames) {
                /* XXX: encoded_frames() should check which frames have been encoded */
-               u << " (" << (_film->encoded_frames() * 100 / _film->length().frames (_film->video_frame_rate ())) << "%)";
+               u << " (" << (_film->encoded_frames() * 100 / frames) << "%)";
        }
        return u.str ();
 }