vaapisink: fix memory leak of GstVaapiUploader instance.

Make sure gst_vaapisink_ensure_uploader() checks for the existence
of a former GstVaapiUploader instance prior to forcibly creating a
new one.

https://bugzilla.gnome.org/show_bug.cgi?id=703980
This commit is contained in:
Wind Yuan 2013-05-14 15:19:04 +08:00 committed by Gwenole Beauchesne
parent 92a124f306
commit e5a50af2ae

View file

@ -673,13 +673,7 @@ gst_vaapisink_start(GstBaseSink *base_sink)
{
GstVaapiSink * const sink = GST_VAAPISINK(base_sink);
if (!gst_vaapisink_ensure_display(sink))
return FALSE;
sink->uploader = gst_vaapi_uploader_new(sink->display);
if (!sink->uploader)
return FALSE;
return TRUE;
return gst_vaapisink_ensure_uploader(sink);
}
static gboolean