From 1a1e20e79ce2033f921c613bc76bbc6ab055cd50 Mon Sep 17 00:00:00 2001 From: ronag Date: Wed, 9 Nov 2011 12:03:20 +0000 Subject: [PATCH] git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@1549 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d --- modules/ffmpeg/producer/ffmpeg_producer.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/modules/ffmpeg/producer/ffmpeg_producer.cpp b/modules/ffmpeg/producer/ffmpeg_producer.cpp index 5641222a1..576f7a3cc 100644 --- a/modules/ffmpeg/producer/ffmpeg_producer.cpp +++ b/modules/ffmpeg/producer/ffmpeg_producer.cpp @@ -99,22 +99,8 @@ public: graph_->set_color("frame-time", diagnostics::color(0.1f, 1.0f, 0.1f)); graph_->set_color("underflow", diagnostics::color(0.6f, 0.3f, 0.9f)); - // Do some pre-work in order to not block rendering thread for initialization and allocations. - - push_packets(); - auto video_frames = video_decoder_.poll(); - if(!video_frames.empty()) - { - auto& video_frame = video_frames.front(); - auto desc = get_pixel_format_desc(static_cast(video_frame->format), video_frame->width, video_frame->height); - if(desc.pix_fmt == core::pixel_format::invalid) - get_pixel_format_desc(PIX_FMT_BGRA, video_frame->width, video_frame->height); - - for(int n = 0; n < 3; ++n) - frame_factory->create_frame(this, desc); - } - BOOST_FOREACH(auto& video, video_frames) - muxer_.push(video, 0); + for(int n = 0; n < 3; ++n) + frame_factory->create_frame(this, std::max(2, video_decoder_.width()), std::max(2, video_decoder_.height())); } virtual safe_ptr receive(int hints) -- 2.39.2