vaapisink: fix memory leak of GstVaapiUploader instance.
authorWind Yuan <feng.yuan@intel.com>
Tue, 14 May 2013 07:19:04 +0000 (15:19 +0800)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Mon, 26 Aug 2013 11:01:26 +0000 (13:01 +0200)
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

gst/vaapi/gstvaapisink.c

index d5a436d..8a828be 100644 (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