Bug 1693849 [PipeWire] Always check allocated video buffer size, r=ng

Differential Revision: https://phabricator.services.mozilla.com/D105802
This commit is contained in:
stransky 2021-02-20 17:12:56 +00:00
parent 7bb1cc6abf
commit 6d59f634f7

View File

@ -406,8 +406,7 @@ void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) {
}
rtc::CritScope lock(&current_frame_lock_);
if (!current_frame_ ||
(video_metadata_use_ && !video_size_.equals(video_size_prev))) {
if (!current_frame_ || !video_size_.equals(video_size_prev)) {
current_frame_ =
std::make_unique<uint8_t[]>
(video_size_.width() * video_size_.height() * kBytesPerPixel);