diff options
Diffstat (limited to 'src/ipa/raspberrypi/cam_helper.cpp')
-rw-r--r-- | src/ipa/raspberrypi/cam_helper.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/raspberrypi/cam_helper.cpp index 93d1b7b0..2837fcce 100644 --- a/src/ipa/raspberrypi/cam_helper.cpp +++ b/src/ipa/raspberrypi/cam_helper.cpp @@ -88,8 +88,10 @@ uint32_t CamHelper::GetVBlanking(double &exposure, double minFrameDuration, void CamHelper::SetCameraMode(const CameraMode &mode) { mode_ = mode; - parser_->SetBitsPerPixel(mode.bitdepth); - parser_->SetLineLengthBytes(0); /* We use SetBufferSize. */ + if (parser_) { + parser_->SetBitsPerPixel(mode.bitdepth); + parser_->SetLineLengthBytes(0); /* We use SetBufferSize. */ + } initialized_ = true; } |