[libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Return correct format for metadata

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Apr 17 13:13:22 CEST 2020


Hi Kieran,

On Fri, Apr 17, 2020 at 09:31:34AM +0100, Kieran Bingham wrote:
> On 16/04/2020 23:05, Laurent Pinchart wrote:
> > When setting format on a metadata video device, the returned format
> > isn't updated with the actual set format due to a typo. Fix it.
> 
> Did you hit this? Or identify it from the coverity scan?
> 
> This is Coverity ID: 279098, if it's worth adding that to the commit
> message.

What would you think of using a Reported-by tag for this ?

Reported-by: Coverity DefectId=279098
Reported-by: Coverity CID=279098
Reported-by: Coverity Scan CID=279098

Any preference ? CID is used in the e-mail reports, no idea what the web
UI uses as it still refuses to show me any data :-)

> > Fixes: 629e9301c518 ("libcamera: v4l2_device: Add META support in g/s_fmt")
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> 
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> 
> > ---
> >  src/libcamera/v4l2_videodevice.cpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
> > index 439a9c90dbf7..a959cfe65c43 100644
> > --- a/src/libcamera/v4l2_videodevice.cpp
> > +++ b/src/libcamera/v4l2_videodevice.cpp
> > @@ -848,7 +848,7 @@ int V4L2VideoDevice::setFormatMeta(V4L2DeviceFormat *format)
> >  	 */
> >  	format->size.width = 0;
> >  	format->size.height = 0;
> > -	format->fourcc = format->fourcc;
> > +	format->fourcc = V4L2PixelFormat(pix->dataformat);
> >  	format->planesCount = 1;
> >  	format->planes[0].bpl = pix->buffersize;
> >  	format->planes[0].size = pix->buffersize;

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list