From: Ronag Date: Fri, 12 Aug 2011 15:42:38 +0000 (+0000) Subject: git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches... X-Git-Tag: 2.0.1~189 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=6482634949a6c7767699ac2b645a03d64cc841a6;p=casparcg git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@1151 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d --- diff --git a/core/mixer/mixer.cpp b/core/mixer/mixer.cpp index fafcef020..863f25884 100644 --- a/core/mixer/mixer.cpp +++ b/core/mixer/mixer.cpp @@ -125,6 +125,14 @@ public: [&]{audio = mix_audio(frames);}); buffer_.push(std::make_pair(std::move(image), audio)); + + if(buffer_.size() > buffer_size_) + { + auto res = std::move(buffer_.front()); + buffer_.pop(); + + return make_safe(channel_.ogl(), channel_.get_format_desc().size, std::move(res.first.get()), std::move(res.second)); + } } catch(...) { @@ -135,14 +143,6 @@ public: CASPAR_LOG_CURRENT_EXCEPTION(); } - - if(buffer_.size() > buffer_size_) - { - auto res = std::move(buffer_.front()); - buffer_.pop(); - - return make_safe(channel_.ogl(), channel_.get_format_desc().size, std::move(res.first.get()), std::move(res.second)); - } return make_safe(); }