Skip to content
This repository has been archived by the owner on Jul 9, 2019. It is now read-only.

Commit

Permalink
use LIST_FOR_EACH_ENTRY_SAFE in DestroySurfaces
Browse files Browse the repository at this point in the history
it fixes the infinite loop in DestroySurfaces,
fix vp8vldemo hang during exit

Change-Id: I16a7f60409d575da6aaf98d246f15a631aeeda41
  • Loading branch information
Zhao, Halley authored and seanvk committed Mar 14, 2014
1 parent d50b1eb commit 602e307
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wrapper_drv_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,13 @@ vawr_DestroySurfaces(VADriverContextP ctx,
{
VAStatus vaStatus;
struct vawr_driver_data *vawr = GET_VAWRDATA(ctx);
vawr_surface_lookup_t *surface;
vawr_surface_lookup_t *surface, *temp;
int i;

if (vawr->profile == VAProfileVP8Version0_3) {
/* First destroy the PVR surfaces */
for (i=0; i<num_surfaces; i++) {
LIST_FOR_EACH_ENTRY(surface, &vawr->surfaces, link) {
LIST_FOR_EACH_ENTRY_SAFE(surface, temp, &vawr->surfaces, link) {
if (surface->i965_surface == surface_list[i]) {
/* Restore the PVR's context for DestroySurfaces purpose */
ctx->pDriverData = vawr->drv_data[1];
Expand Down

0 comments on commit 602e307

Please sign in to comment.