Commit fa5599ae authored by Jean-Paul Saman's avatar Jean-Paul Saman

Make sure all subpictures are released when freeing surfaces.

Cleanup all subpicture associations when freeing a surface.
parent 943350ba
......@@ -292,7 +292,7 @@ create_subpicture(
}
// Destroy XvBA surface bound to VA subpicture
void
static void
destroy_subpicture_surface(
xvba_driver_data_t *driver_data,
object_subpicture_p obj_subpicture
......@@ -303,11 +303,11 @@ destroy_subpicture_surface(
object_image_p const obj_image = XVBA_IMAGE(obj_subpicture->image_id);
if (obj_image)
destroy_hw_image(driver_data, obj_image);
destroy_image(driver_data, obj_image);
}
// Destroy subpicture
static void
// Destroy subpicture bound to a XvBA surface
void
destroy_subpicture(
xvba_driver_data_t *driver_data,
object_subpicture_p obj_subpicture
......
......@@ -38,9 +38,9 @@ struct object_subpicture {
float alpha;
};
// Destroy XvBA surface bound to VA subpictures
// Destroy subpicture bound to a XvBA surface
void
destroy_subpicture_surface(
destroy_subpicture(
xvba_driver_data_t *driver_data,
object_subpicture_p obj_subpicture
) attribute_hidden;
......
......@@ -69,7 +69,7 @@ static XVBACodec get_XVBACodec(VAProfile profile)
// Destroys XvBA subpictures bound to a VA surface
static void
destroy_subpictures(
destroy_surface_subpictures(
xvba_driver_data_t *driver_data,
object_surface_p obj_surface
)
......@@ -77,7 +77,7 @@ destroy_subpictures(
unsigned int i;
for (i = 0; i < obj_surface->assocs_count; i++) {
SubpictureAssociationP const assoc = obj_surface->assocs[i];
destroy_subpicture_surface(
destroy_subpicture(
driver_data,
XVBA_SUBPICTURE(assoc->subpicture)
);
......@@ -125,7 +125,7 @@ ensure_surface_size(
static void
destroy_surface(xvba_driver_data_t *driver_data, object_surface_p obj_surface)
{
destroy_subpictures(driver_data, obj_surface);
destroy_surface_subpictures(driver_data, obj_surface);
destroy_surface_buffers(driver_data, obj_surface);
if (obj_surface->xvba_surface) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment