diff --git a/subprojects/gst-plugins-bad/sys/va/gstvafilter.c b/subprojects/gst-plugins-bad/sys/va/gstvafilter.c index 13393b6c9d..44f54db091 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvafilter.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvafilter.c @@ -358,9 +358,6 @@ gst_va_filter_open (GstVaFilter * self) if (!gst_va_filter_ensure_config_attributes (self, &attrib.value)) return FALSE; - if (!gst_va_filter_ensure_pipeline_caps (self)) - return FALSE; - self->image_formats = gst_va_display_get_image_formats (self->display); if (!self->image_formats) return FALSE; @@ -384,6 +381,11 @@ gst_va_filter_open (GstVaFilter * self) goto bail; } + if (!gst_va_filter_ensure_pipeline_caps (self)) { + vaDestroyContext (dpy, self->context); + goto bail; + } + return TRUE; bail: