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/7540>
This commit is contained in:
Nicolas Dufresne 2024-08-15 16:54:25 -04:00 committed by GStreamer Marge Bot
parent 86dddfa61c
commit d35f348af3

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,