vaapi: fix minor leaks

https://bugzilla.gnome.org/show_bug.cgi?id=767868
This commit is contained in:
Hyunjun Ko 2016-06-20 19:53:26 +09:00 committed by Sebastian Dröge
parent fc8fbddc5c
commit 2fb05613a0
2 changed files with 5 additions and 1 deletions

View file

@ -333,6 +333,8 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode)
allocation_caps);
}
gst_caps_replace (&state->allocation_caps, allocation_caps);
if (allocation_caps)
gst_caps_unref (allocation_caps);
GST_INFO_OBJECT (decode, "new src caps = %" GST_PTR_FORMAT, state->caps);
gst_caps_replace (&decode->srcpad_caps, state->caps);

View file

@ -1046,7 +1046,7 @@ gst_vaapipostproc_fixate_caps (GstBaseTransform * trans,
GstPadDirection direction, GstCaps * caps, GstCaps * othercaps)
{
GstVaapiPostproc *const postproc = GST_VAAPIPOSTPROC (trans);
GstCaps *outcaps;
GstCaps *outcaps = NULL;
GST_DEBUG_OBJECT (trans, "trying to fixate othercaps %" GST_PTR_FORMAT
" based on caps %" GST_PTR_FORMAT " in direction %s", othercaps, caps,
@ -1065,6 +1065,8 @@ gst_vaapipostproc_fixate_caps (GstBaseTransform * trans,
done:
GST_DEBUG_OBJECT (trans, "fixated othercaps to %" GST_PTR_FORMAT, othercaps);
if (outcaps)
gst_caps_unref (outcaps);
return othercaps;
}