]> git.sesse.net Git - casparcg/commitdiff
2.1.0: -transition_producer: Fixed a bug where the source producer wasn't always...
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 16 Feb 2012 17:32:22 +0000 (17:32 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 16 Feb 2012 17:32:22 +0000 (17:32 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.1.0@2435 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

core/producer/transition/transition_producer.cpp

index f83dbc17c1c6208508d1cebb95109755a2a11a36..8a663194186e16aea6ebf12cb03b572b76f894d3 100644 (file)
@@ -70,8 +70,13 @@ public:
        virtual draw_frame receive(int flags) override\r
        {\r
                if(current_frame_ >= info_.duration)\r
+               {\r
+                       source_producer_ = core::frame_producer::empty();\r
                        return dest_producer_->receive(flags);\r
-               \r
+               }\r
+\r
+               ++current_frame_;\r
+\r
                event_subject_  << monitor::event("transition/frame") % current_frame_ % info_.duration\r
                                                << monitor::event("transition/type") % [&]() -> std::string\r
                                                                                                                                {\r
@@ -101,13 +106,8 @@ public:
                        source = source_producer_->receive(flags);\r
                        if(source == core::draw_frame::late())\r
                                source = source_producer_->last_frame();\r
-               });             \r
+               });                             \r
                \r
-               ++current_frame_;\r
-\r
-               if(current_frame_ >= info_.duration)\r
-                       source_producer_ = core::frame_producer::empty();\r
-\r
                return compose(dest, source);\r
        }\r
 \r