Fix memory leak when doing YUV data upload
authorZhao Halley <halley.zhao@intel.com>
Fri, 19 Apr 2013 08:10:22 +0000 (16:10 +0800)
committerZhao Halley <halley.zhao@intel.com>
Fri, 19 Apr 2013 11:02:47 +0000 (19:02 +0800)
commit61e26450ceed0324b3a5711301bacaefcb2c6318
tree60314a1448a892eab7a7bc75305aaba315ef4856
parent5c4c51065822f6a794f7c30fb6c7ee5c7f4c84b5
Fix memory leak when doing YUV data upload

Indirect set surface to video buffer will leak memory,
    - when video buffer is destroy, the surface is not returned back to surface pool.
    - gst_vaapi_video_buffer_set_surface_from_pool() is correct,
    - while the following is incorrect:
        surface = gst_vaapi_video_pool_get_object(priv->surfaces);
        gst_vaapi_video_buffer_set_surface(vbuffer, surface);
gst/vaapi/gstvaapiuploader.c [changed mode: 0644->0755]