bump: 0.0.3
This commit is contained in:
parent
1684b7655c
commit
6a24ae2a85
4 changed files with 7 additions and 6 deletions
|
|
@ -19,9 +19,10 @@ TextureRgba::~TextureRgba()
|
|||
void TextureRgba::MarkVideoFrameAvailable(const std::vector<uint8_t>& buffer, size_t width, size_t height)
|
||||
{
|
||||
const std::lock_guard<std::mutex> lock(mutex_);
|
||||
buffer_tmp_.resize(buffer.size());
|
||||
std::copy(buffer.begin(), buffer.end(), buffer_tmp_.begin());
|
||||
flutter_pixel_buffer_.buffer = &buffer_tmp_[0];
|
||||
// FIXME: maybe without copy, it's easily crash with corrupt memory access.
|
||||
// buffer_tmp_.resize(buffer.size());
|
||||
// std::copy(buffer.begin(), buffer.end(), buffer_tmp_.begin());
|
||||
flutter_pixel_buffer_.buffer = &buffer[0];
|
||||
flutter_pixel_buffer_.width = width;
|
||||
flutter_pixel_buffer_.height = height;
|
||||
texture_registrar_->MarkTextureFrameAvailable(texture_id_);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue