libs: postproc: fix a memory leak point.

filter_ops and filter_formats should already have valid value when
the function gst_vaapipostproc_ensure_filter_caps re-enter
This commit is contained in:
He Junyan 2019-08-27 18:12:45 +08:00 committed by Víctor Manuel Jáquez Leal
parent 51963b1a74
commit 70cefdd272

View file

@ -246,13 +246,17 @@ gst_vaapipostproc_ensure_filter_caps (GstVaapiPostproc * postproc)
if (!gst_vaapipostproc_ensure_filter (postproc))
return FALSE;
postproc->filter_ops = gst_vaapi_filter_get_operations (postproc->filter);
if (!postproc->filter_ops)
return FALSE;
if (!postproc->filter_ops) {
postproc->filter_ops = gst_vaapi_filter_get_operations (postproc->filter);
if (!postproc->filter_ops)
return FALSE;
}
postproc->filter_formats = gst_vaapi_filter_get_formats (postproc->filter);
if (!postproc->filter_formats)
return FALSE;
if (!postproc->filter_formats) {
postproc->filter_formats = gst_vaapi_filter_get_formats (postproc->filter);
if (!postproc->filter_formats)
return FALSE;
}
return TRUE;
}