plugins: make it possible to clear VA objects from GstVaapiVideoMeta.

Fix GstVaapiVideoMeta to allow VA objects to be destroyed when they are
reset to NULL. i.e. make gst_vaapi_video_meta_set_{image,surface}() and
gst_vaapi_video_meta_set_surface_proxy() actually clear VA objects when
argument is NULL.
This commit is contained in:
Gwenole Beauchesne 2013-04-04 16:16:31 +02:00
parent 38d84d968e
commit 8fe0011450

View file

@ -424,7 +424,6 @@ void
gst_vaapi_video_meta_set_image(GstVaapiVideoMeta *meta, GstVaapiImage *image)
{
g_return_if_fail(GST_VAAPI_IS_VIDEO_META(meta));
g_return_if_fail(GST_VAAPI_IS_IMAGE(image));
gst_vaapi_video_meta_destroy_image(meta);
@ -497,7 +496,6 @@ gst_vaapi_video_meta_set_surface(GstVaapiVideoMeta *meta,
GstVaapiSurface *surface)
{
g_return_if_fail(GST_VAAPI_IS_VIDEO_META(meta));
g_return_if_fail(GST_VAAPI_IS_SURFACE(surface));
gst_vaapi_video_meta_destroy_surface(meta);
@ -572,7 +570,6 @@ gst_vaapi_video_meta_set_surface_proxy(GstVaapiVideoMeta *meta,
GstVaapiSurface *surface;
g_return_if_fail(GST_VAAPI_IS_VIDEO_META(meta));
g_return_if_fail(proxy != NULL);
gst_vaapi_video_meta_destroy_surface(meta);