Skip to content

Commit

Permalink
Don't expect to always be able to allocate the pixel buffer
Browse files Browse the repository at this point in the history
Summary: When reading compressed images, we don't always know the content of the compressed data, and we shouldn't warn about it.

Reviewed By: jstraub

Differential Revision: D52140732

fbshipit-source-id: 3e42d08534502ef330443cd8926fc5fa79c2cb25
  • Loading branch information
Georges Berenger authored and facebook-github-bot committed Dec 14, 2023
1 parent 2a41e76 commit 2b905e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions csrc/reader/MultiVRSReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ bool OssMultiVRSReader::MultiVideoRecordFormatStreamPlayer::setBlock(
record.reader->read(data);
block.structuredArray = false;
} else {
std::shared_ptr<utils::PixelFrame> frame =
make_shared<utils::PixelFrame>(contentBlock.image());
std::shared_ptr<utils::PixelFrame> frame = make_shared<utils::PixelFrame>();
bool frameValid = readFrame(*frame, record, contentBlock);
if (XR_VERIFY(frameValid)) {
block.structuredArray = true;
Expand Down
2 changes: 1 addition & 1 deletion csrc/reader/VRSReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ bool OssVRSReader::setBlock(
record.reader->read(data);
block.structuredArray = false;
} else {
shared_ptr<utils::PixelFrame> frame = make_shared<utils::PixelFrame>(contentBlock.image());
shared_ptr<utils::PixelFrame> frame = make_shared<utils::PixelFrame>();
bool frameValid = readFrame(*frame, record, contentBlock);
if (XR_VERIFY(frameValid)) {
block.structuredArray = true;
Expand Down

0 comments on commit 2b905e6

Please sign in to comment.