Commit 265d9f65 authored by Jean-Paul Saman's avatar Jean-Paul Saman

src/xvba_video.c: Do not leak subpicture associations.

xvba_DestroySurfaces() leaked subpicture associations, since the
for loop did not actually iterate over the subpicture association
array.
parent a2b59c02
......@@ -580,12 +580,14 @@ xvba_DestroySurfaces(
const unsigned int n_assocs = obj_surface->assocs_count;
for (j = 0, n = 0; j < n_assocs; j++) {
SubpictureAssociationP const assoc = obj_surface->assocs[0];
SubpictureAssociationP const assoc = obj_surface->assocs[j];
if (!assoc)
continue;
obj_subpicture = XVBA_SUBPICTURE(assoc->subpicture);
if (!obj_subpicture)
continue;
/* FIXME: release any subpicture image memory too if it happens
* to still be allocated. */
status = subpicture_deassociate_1(obj_subpicture, obj_surface);
if (status == VA_STATUS_SUCCESS)
++n;
......
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