pipeline: rpi: ipa_base: Parse config files after platformRegister()
If a user uses a pipeline handler config file where a custom timeout
value is specified, it would lead to a segmentation fault when
loadPipelineConfiguration() tried to access the as yet uninitialised
V4L2VideoDevice object.
To fix this, parse the pipeline handler config file only after fully
initialising and registering the pipeline handler and V4L2VideoDevice
objects.
Fixes: 6c71ee1f15
("pipeline: raspberrypi: Introduce PipelineHandlerBase class")
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
7d5b38e2ef
commit
58f38082e1
1 changed files with 4 additions and 4 deletions
|
@ -888,16 +888,16 @@ int PipelineHandlerBase::registerCamera(std::unique_ptr<RPi::CameraData> &camera
|
||||||
}
|
}
|
||||||
data->nativeBayerOrder_ = bayerFormat.order;
|
data->nativeBayerOrder_ = bayerFormat.order;
|
||||||
|
|
||||||
|
ret = platformRegister(cameraData, frontend, backend);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
ret = data->loadPipelineConfiguration();
|
ret = data->loadPipelineConfiguration();
|
||||||
if (ret) {
|
if (ret) {
|
||||||
LOG(RPI, Error) << "Unable to load pipeline configuration";
|
LOG(RPI, Error) << "Unable to load pipeline configuration";
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = platformRegister(cameraData, frontend, backend);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
/* Setup the general IPA signal handlers. */
|
/* Setup the general IPA signal handlers. */
|
||||||
data->frontendDevice()->dequeueTimeout.connect(data, &RPi::CameraData::cameraTimeout);
|
data->frontendDevice()->dequeueTimeout.connect(data, &RPi::CameraData::cameraTimeout);
|
||||||
data->frontendDevice()->frameStart.connect(data, &RPi::CameraData::frameStarted);
|
data->frontendDevice()->frameStart.connect(data, &RPi::CameraData::frameStarted);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue