]> git.sesse.net Git - casparcg/commitdiff
Fixed bug where CPU accelerator didn't support SET MODE changes.
authorHelge Norberg <helge.norberg@svt.se>
Wed, 2 Mar 2016 14:26:26 +0000 (15:26 +0100)
committerHelge Norberg <helge.norberg@svt.se>
Wed, 2 Mar 2016 14:26:26 +0000 (15:26 +0100)
accelerator/cpu/image/image_mixer.cpp

index 5616334cf3c5f9e892ad07bf7e287b4ac8df23f0..ac2ebbbd9c458b5fab5f702fd683bf64069c8df0 100644 (file)
@@ -151,9 +151,16 @@ class image_renderer
 {
        tbb::concurrent_unordered_map<int64_t, tbb::concurrent_bounded_queue<std::shared_ptr<SwsContext>>>      sws_devices_;
        tbb::concurrent_bounded_queue<spl::shared_ptr<buffer>>                                                                                          temp_buffers_;
+       core::video_format_desc                                                                                                                                                         format_desc_;
 public:        
        std::future<array<const std::uint8_t>> operator()(std::vector<item> items, const core::video_format_desc& format_desc)
-       {       
+       {
+               if (format_desc != format_desc_)
+               {
+                       format_desc_ = format_desc;
+                       sws_devices_.clear();
+               }
+
                convert(items, format_desc.width, format_desc.height);          
                                
                // Remove first field stills.