]> 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>
Wed, 9 Nov 2011 12:03:20 +0000 (12:03 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 9 Nov 2011 12:03:20 +0000 (12:03 +0000)
modules/ffmpeg/producer/ffmpeg_producer.cpp

index 5641222a1f423d958c17b3dc15b21d6bdd59d7b8..576f7a3cc05ace01b717e287e915274ce62f6441 100644 (file)
@@ -99,22 +99,8 @@ public:
                graph_->set_color("frame-time", diagnostics::color(0.1f, 1.0f, 0.1f));\r
                graph_->set_color("underflow", diagnostics::color(0.6f, 0.3f, 0.9f));   \r
                \r
-               // Do some pre-work in order to not block rendering thread for initialization and allocations.\r
-\r
-               push_packets();\r
-               auto video_frames = video_decoder_.poll();\r
-               if(!video_frames.empty())\r
-               {\r
-                       auto& video_frame = video_frames.front();\r
-                       auto  desc                = get_pixel_format_desc(static_cast<PixelFormat>(video_frame->format), video_frame->width, video_frame->height);\r
-                       if(desc.pix_fmt == core::pixel_format::invalid)\r
-                               get_pixel_format_desc(PIX_FMT_BGRA, video_frame->width, video_frame->height);\r
-                       \r
-                       for(int n = 0; n < 3; ++n)\r
-                               frame_factory->create_frame(this, desc);\r
-               }\r
-               BOOST_FOREACH(auto& video, video_frames)                        \r
-                       muxer_.push(video, 0);  \r
+               for(int n = 0; n < 3; ++n)\r
+                       frame_factory->create_frame(this, std::max<size_t>(2, video_decoder_.width()), std::max<size_t>(2, video_decoder_.height()));\r
        }\r
                        \r
        virtual safe_ptr<core::basic_frame> receive(int hints)\r