replay/CameraServer: yuv_buf should not be null (#25545)

old-commit-hash: f95519cb440ab25e24f14c12d37da535646d8419
This commit is contained in:
Dean Lee
2022-08-25 02:03:54 +08:00
committed by GitHub
parent a9f4294d99
commit 06556bd76a
+2 -1
View File
@@ -37,7 +37,8 @@ void CameraServer::startVipcServer() {
void CameraServer::cameraThread(Camera &cam) {
auto read_frame = [&](FrameReader *fr, int frame_id) {
VisionBuf *yuv_buf = vipc_server_->get_buffer(cam.stream_type);
bool ret = fr->get(frame_id, yuv_buf ? (uint8_t *)yuv_buf->addr : nullptr);
assert(yuv_buf);
bool ret = fr->get(frame_id, (uint8_t *)yuv_buf->addr);
return ret ? yuv_buf : nullptr;
};