va: encoder: Fix error code path when open.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
This commit is contained in:
Víctor Manuel Jáquez Leal 2022-03-03 14:08:16 +01:00 committed by GStreamer Marge Bot
parent 81c00664a2
commit 7aa597d6df

View file

@ -482,10 +482,10 @@ error:
g_clear_pointer (&reconstruct_buffers, g_ptr_array_unref);
g_clear_pointer (&recon_pool, gst_object_unref);
if (config == VA_INVALID_ID)
if (config != VA_INVALID_ID)
vaDestroyConfig (dpy, config);
if (context == VA_INVALID_ID)
if (context != VA_INVALID_ID)
vaDestroyContext (dpy, context);
return FALSE;