diff --git a/src/SourceImpl.cpp b/src/SourceImpl.cpp index d5db1f9604..c259bfa84d 100644 --- a/src/SourceImpl.cpp +++ b/src/SourceImpl.cpp @@ -301,6 +301,10 @@ void SourceImpl::PutFrame(VideoMode::PixelFormat pixelFormat, int width, << " bytes)"); std::memcpy(frameData->data, data.data(), data.size()); + PutFrame(std::move(frameData)); +} + +void SourceImpl::PutFrame(std::unique_ptr frameData) { // Update frame { std::lock_guard lock{m_frameMutex}; diff --git a/src/SourceImpl.h b/src/SourceImpl.h index 7a8ec05165..c72ba94ce6 100644 --- a/src/SourceImpl.h +++ b/src/SourceImpl.h @@ -122,6 +122,7 @@ class SourceImpl { protected: void PutFrame(VideoMode::PixelFormat pixelFormat, int width, int height, llvm::StringRef data, Frame::Time time); + void PutFrame(std::unique_ptr frameData); void PutError(llvm::StringRef msg, Frame::Time time) { PutFrame(VideoMode::kUnknown, 0, 0, msg, time); }