videobuffer: fix memory leak for surface and image.
authorWind Yuan <feng.yuan@intel.com>
Tue, 30 Oct 2012 05:15:45 +0000 (13:15 +0800)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Mon, 17 Dec 2012 13:56:11 +0000 (14:56 +0100)
commit72f045bedd8c64d7b82429a2373d3d61bc2ef0fa
treebb4dcbf185a6a353a345a7a548ae5ee3ddac912f
parenta7b4916b5a13fe2ac6e6ca356ee7745db03d5c2c
videobuffer: fix memory leak for surface and image.

Fix reference leak of surface and image in GstVaapiVideoBuffer wrapper,
thus resulting on actual memory leak of GstVaapiImage when using them
for downloads/uploads from VA surfaces and more specifically surfaces
when the pipeline is shutdown. i.e. vaTerminate() was never called
because the resources were not unreferenced, and thus not deallocated
in the end.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
gst-libs/gst/vaapi/gstvaapivideobuffer.c