decoder: fix memory leak of VA objects on exit.

On sequence end, if the last decoded picture is not output for rendering,
then the proxy surface is not created. In this case, the original surface
must be released explicitly to the context.
This commit is contained in:
Gwenole Beauchesne 2012-01-31 11:26:37 +01:00
parent 11d09495ea
commit 399875ee86

View file

@ -75,7 +75,10 @@ gst_vaapi_picture_destroy(GstVaapiPicture *picture)
g_object_unref(picture->proxy);
picture->proxy = NULL;
}
else if (picture->surface) {
/* Explicitly release any surface that was not bound to a proxy */
gst_vaapi_context_put_surface(GET_CONTEXT(picture), picture->surface);
}
picture->surface_id = VA_INVALID_ID;
picture->surface = NULL;