vaapidecodebin: fix a leaked display instance

The display returned by gst_vaapi_video_context_get_display() increments the
references. Thus, we have to unref the returned display.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=757595
This commit is contained in:
Víctor Manuel Jáquez Leal 2015-11-02 19:05:07 +01:00
parent f182fcfb37
commit a2611b7f35

View file

@ -314,6 +314,12 @@ gst_vaapi_decode_bin_handle_message (GstBin * bin, GstMessage * message)
activate_vpp (vaapidecbin);
bail:
if (display)
gst_vaapi_display_unref (display);
if (context)
gst_context_unref (context);
GST_BIN_CLASS (gst_vaapi_decode_bin_parent_class)->handle_message (bin,
message);
}