+ // 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