if (obj_surface == NULL) {
vaStatus = VA_STATUS_ERROR_INVALID_PARAMETER; // Surface is absent
- goto error;
+ return vaStatus;
}
if (obj_surface->locked_image_id == VA_INVALID_ID) {
vaStatus = VA_STATUS_ERROR_INVALID_PARAMETER; // Surface is not locked
- goto error;
+ return vaStatus;
}
locked_img = IMAGE(obj_surface->locked_image_id);
locked_img->image.image_id = VA_INVALID_ID;
error:
+ obj_surface->locked_image_id = VA_INVALID_ID;
+
return vaStatus;
}