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>
Fri, 6 Jan 2012 09:59:59 +0000 (10:59 +0100)
commitc8ff372b298b46a942cb8217af4d39a9227e23b9
tree34fe92191e4a0987745e7540a468bc0c2e78286d
parentb4e5a0551cd4527173ec6adff11fbc41ff69d96b
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