]> git.sesse.net Git - casparcg/commitdiff
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Mon, 26 Mar 2012 18:53:59 +0000 (18:53 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Mon, 26 Mar 2012 18:53:59 +0000 (18:53 +0000)
core/producer/transition/transition_producer.cpp

index da8390736a3a7bb14c5e58475c39fe26916a924c..ff167bcdb399fad4b22cfdbc512b164750bd8c47 100644 (file)
@@ -70,13 +70,8 @@ public:
        draw_frame receive_impl() override\r
        {\r
                if(current_frame_ >= info_.duration)\r
-               {\r
-                       source_producer_ = core::frame_producer::empty();\r
-                       return dest_producer_->receive();\r
-               }\r
-\r
-               ++current_frame_;\r
-\r
+                       return dest_producer_->receive();               \r
+               \r
                auto dest = draw_frame::empty();\r
                auto source = draw_frame::empty();\r
 \r
@@ -92,7 +87,12 @@ public:
                        source = source_producer_->receive();\r
                        if(source == core::draw_frame::late())\r
                                source = source_producer_->last_frame();\r
-               });                             \r
+               });                     \r
+                               \r
+               current_frame_ += 1;\r
+\r
+               if(current_frame_ >= info_.duration)\r
+                       source_producer_ = core::frame_producer::empty();\r
                \r
                event_subject_  << monitor::event("transition/frame") % current_frame_ % info_.duration\r
                                                << monitor::event("transition/type") % [&]() -> std::string\r