decoder: fix possible leak of VA surfaces.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 5 Jan 2012 16:09:35 +0000 (17:09 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 5 Jan 2012 16:35:43 +0000 (17:35 +0100)
commit3e1d235c1ac49ad07afc1da4cb68a06ab64784e5
tree586a1d6da583f07aceb14f6e276cbb1c80566424
parent4e72aa587c883a859a3b0ed6ecd13b8063f8d9e9
decoder: fix possible leak of VA surfaces.

Under some circumstances, we could have leaked a surface, thus not
releasing it to the pool of available surfaces in the VA context.
The strategy is now to use a proxy earlier and automatically ref/unref
whenever necessary. In particular, during the lifetime needed for FFmpeg.
gst-libs/gst/vaapi/gstvaapidecoder.c
gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c
gst-libs/gst/vaapi/gstvaapidecoder_priv.h