libcamera: pipeline: simple: converter: Handle unsupported input format
SimpleConverter::formats() should return an empty vector if the input format is not supported by the converter. Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
cf66dee4ac
commit
d4eee094e6
1 changed files with 6 additions and 0 deletions
|
@ -220,6 +220,12 @@ std::vector<PixelFormat> SimpleConverter::formats(PixelFormat input)
|
|||
return {};
|
||||
}
|
||||
|
||||
if (v4l2Format.fourcc != V4L2PixelFormat::fromPixelFormat(input)) {
|
||||
LOG(SimplePipeline, Debug)
|
||||
<< "Input format " << input << " not supported.";
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<PixelFormat> pixelFormats;
|
||||
|
||||
for (const auto &format : m2m_->capture()->formats()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue