]> git.sesse.net Git - casparcg/blobdiff - core/producer/flash/flash_producer.cpp
2.0.0.2: Improved solution and project configurations.
[casparcg] / core / producer / flash / flash_producer.cpp
index 8767d95d8136e25375ea6b4aece3eddab1173eb3..fff22e776322146573e8d648fb9d8179be24cb71 100644 (file)
@@ -150,7 +150,8 @@ private:
 \r
        safe_ptr<draw_frame> render_simple_frame(bool has_underflow)\r
        {\r
-               timer_.tick(1.0/ax_->GetFPS()*(has_underflow ? 0.95 : 1.0)); // Tick doesnt work on nested timelines, force an actual sync\r
+               double frame_time = 1.0/ax_->GetFPS()*(has_underflow ? 0.95 : 1.0); \r
+               timer_.tick(frame_time); // Tick doesnt work on nested timelines, force an actual sync\r
 \r
                diag_timer_.reset();\r
                ax_->Tick();\r
@@ -165,7 +166,7 @@ private:
                        head_ = frame;\r
                }               \r
                \r
-               graph_->update("frame-time", static_cast<float>(diag_timer_.elapsed()/(1.0/ax_->GetFPS())));\r
+               graph_->update("frame-time", static_cast<float>(diag_timer_.elapsed()/frame_time));\r
                return head_;\r
        }\r
 };\r