fix: Fix Frame.bytesPerRow
showing wrong values on iOS (#688)
This commit is contained in:
parent
dd7fc0880e
commit
e8a8e71a76
@ -69,7 +69,7 @@ jsi::Value FrameHostObject::get(jsi::Runtime& runtime, const jsi::PropNameID& pr
|
|||||||
if (name == "bytesPerRow") {
|
if (name == "bytesPerRow") {
|
||||||
this->assertIsFrameStrong(runtime, name);
|
this->assertIsFrameStrong(runtime, name);
|
||||||
auto imageBuffer = CMSampleBufferGetImageBuffer(frame.buffer);
|
auto imageBuffer = CMSampleBufferGetImageBuffer(frame.buffer);
|
||||||
auto bytesPerRow = CVPixelBufferGetPlaneCount(imageBuffer);
|
auto bytesPerRow = CVPixelBufferGetBytesPerRow(imageBuffer);
|
||||||
return jsi::Value((double) bytesPerRow);
|
return jsi::Value((double) bytesPerRow);
|
||||||
}
|
}
|
||||||
if (name == "planesCount") {
|
if (name == "planesCount") {
|
||||||
|
Loading…
Reference in New Issue
Block a user