v4l2: object: Fix condition check to emit error

The check was reversed, so we could only emit a pipeline error
if there was no element associated with the object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7563>
This commit is contained in:
Nicolas Dufresne 2024-08-15 16:54:25 -04:00 committed by Nicolas Dufresne
parent 625d1bf27f
commit 1149750769

View file

@ -1305,7 +1305,7 @@ failed:
{ {
g_free (format); g_free (format);
if (v4l2object->element) if (!v4l2object->element)
return FALSE; return FALSE;
GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS, GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS,