]> git.sesse.net Git - casparcg/blobdiff - core/consumer/output.cpp
2.0. Added image_consumer and PRINT command.
[casparcg] / core / consumer / output.cpp
index 48b8ea2e0606bc7274141dba8bb21331f35b6921..4a2941c575d287f262bbca26c7df1bb8d55e94f1 100644 (file)
@@ -135,9 +135,12 @@ public:
                                        auto frame = consumer->key_only() ? key : fill;\r
 \r
                                        if(frame->image_size() == consumer->get_video_format_desc().size)\r
-                                               consumer->send(frame);\r
-\r
-                                       ++it;\r
+                                       {       \r
+                                               if(!consumer->send(frame))\r
+                                                       consumers_.erase(it++);\r
+                                               else\r
+                                                       ++it;\r
+                                       }\r
                                }\r
                                catch(...)\r
                                {\r