pipeline: raspberrypi: Avoid invalid PixelFormat warning message

PixelFormatInfo::info() would log a warning message if the PixelFormat was
invalid when called from the isRaw() function. Add a validity test in isRaw()
to avoid this warning message.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Naushir Patuck 2021-11-18 16:42:16 +00:00 committed by Kieran Bingham
parent 9c246b77e4
commit dbd2e30ee3

View file

@ -102,6 +102,9 @@ bool isRaw(const PixelFormat &pixFmt)
* The isRaw test might be redundant right now the pipeline handler only
* supports RAW sensors. Leave it in for now, just as a sanity check.
*/
if (!pixFmt.isValid())
return false;
const PixelFormatInfo &info = PixelFormatInfo::info(pixFmt);
if (!info.isValid())
return false;