surface: fix VA image leak when an error occurred.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Mon, 12 Dec 2011 17:37:13 +0000 (18:37 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Mon, 12 Dec 2011 17:37:13 +0000 (18:37 +0100)
gst-libs/gst/vaapi/gstvaapisurface.c

index f7e4b8c..54bc432 100644 (file)
@@ -853,6 +853,7 @@ gst_vaapi_surface_update_composition(
 
         if (!gst_vaapi_image_update_from_buffer (subtitle_image, buf, &sub_rect)) {
             GST_WARNING ("could not update VA image with subtitle data");
+            g_object_unref (subtitle_image);
             return FALSE;
         }