[libcamera-devel] [PATCH v2] gstreamer: Implement element EOS handling

Barnabás Pőcze pobrn at protonmail.com
Fri Nov 10 23:15:25 CET 2023


Hi


2023. november 10., péntek 17:29 keltezéssel, Laurent Pinchart via libcamera-devel írta:

> [...]
> > +	if (GstEvent *event = self->pending_eos.exchange(nullptr)) {
> 
> I don't think we ever declare variables in if () statements in
> libcamera, you may want to write this as

> 
> 	GstEvent *event = self->pending_eos.exchange(nullptr);
> 	if (event) {
> [...]

IIRC that is valid since at least C++11. Or is this more of a stylistic choice?

Regards,
Barnabás Pőcze


More information about the libcamera-devel mailing list