Fix memory leak when doing YUV data upload accepted/2.0/20130419.171527 submit/2.0/20130419.104529
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 10:10:39 +0000 (18:10 +0800)
commit1cdbcfe50220bf3dcd2bf52c707e296bf65ff202
tree3b5f177655f8d5cc72caa95d322c55a0e104536d
parenta2e6481f11149dcd5ff7fe74d1cffa5ad2c92d59
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]