Skip to content

Commit

Permalink
Make single and multi reader behave the same, in particular for audio
Browse files Browse the repository at this point in the history
Summary: We found that SyncVRSReader doesn't handle audio the same when used with a single or a multi reader, which is caused by a different implementation between the two. This diff fixes the issue and adds a test to prove that audio is handled the same.

Reviewed By: finik

Differential Revision: D68034361

fbshipit-source-id: b8a70dd046541b81ecd4f23d568a0960cdffb517
  • Loading branch information
Georges Berenger authored and facebook-github-bot committed Jan 11, 2025
1 parent 99cf0ae commit 74c60f8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions csrc/reader/MultiVRSReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,8 @@ bool OssMultiVRSReader::MultiVRSReaderStreamPlayer::setBlock(
if (contentBlock.getContentType() == ContentType::IMAGE) {
// for raw images, we return a structured array based on the image format
block.structuredArray = (contentBlock.image().getImageFormat() == vrs::ImageFormat::RAW);
} else if (contentBlock.getContentType() != ContentType::AUDIO) {
block.structuredArray = true;
} else {
block.structuredArray = false;
block.structuredArray = (contentBlock.getContentType() == ContentType::AUDIO);
}
} else if (imageConversion == ImageConversion::RawBuffer) {
// default handling
Expand Down

0 comments on commit 74c60f8

Please sign in to comment.