init video, dirty_age, nr_dirty_rcs to zero

This commit is contained in:
Vincent Wei
2020-01-21 12:08:38 +08:00
parent 947cde2e9b
commit 44cea5b587

View File

@@ -181,6 +181,8 @@ GAL_Surface * GAL_CreateSharedRGBSurface (GAL_VideoDevice *video,
if (fd < 0) {
goto error;
}
surface->video = NULL;
}
map_size = buf_off + buf_size;
@@ -207,6 +209,8 @@ GAL_Surface * GAL_CreateSharedRGBSurface (GAL_VideoDevice *video,
hdr->Bmask = Bmask;
hdr->Amask = Amask;
hdr->buf_size = buf_size;
hdr->dirty_age = 0;
hdr->nr_dirty_rcs = 0;
#if 1
/* Use a unnamed POSIX semaphore shared between processes */
@@ -375,6 +379,7 @@ GAL_Surface * GAL_AttachSharedRGBSurface (int fd, size_t map_size,
}
surface->hwdata = NULL;
surface->video = NULL;
surface->shared_header = (GAL_SharedSurfaceHeader*) data_map;
}