diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2021-11-18 16:42:16 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-11-23 13:46:04 +0000 |
commit | dbd2e30ee3bfd1dded8048693d577dded664d05b (patch) | |
tree | 4eb1d8f64ac1b4b82fc660af2fb3bc3f732ac982 /src | |
parent | 9c246b77e4982d4fbfdbf980df0d374547d7bfcc (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 4f6c699a..ad526a8b 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -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; |