diff --git a/include/neatvnc.h b/include/neatvnc.h index 64e7115..f62dba5 100644 --- a/include/neatvnc.h +++ b/include/neatvnc.h @@ -99,7 +99,7 @@ uint32_t nvnc_fb_get_fourcc_format(const struct nvnc_fb* fb); struct nvnc_fb_pool* nvnc_fb_pool_new(uint16_t width, uint16_t height, uint32_t fourcc_format); -void nvnc_fb_pool_resize(struct nvnc_fb_pool*, uint16_t width, uint16_t height, +bool nvnc_fb_pool_resize(struct nvnc_fb_pool*, uint16_t width, uint16_t height, uint32_t fourcc_format); void nvnc_fb_pool_ref(struct nvnc_fb_pool*); diff --git a/src/fb_pool.c b/src/fb_pool.c index c4089ba..fe7846d 100644 --- a/src/fb_pool.c +++ b/src/fb_pool.c @@ -75,18 +75,20 @@ static void nvnc_fb_pool__destroy(struct nvnc_fb_pool* self) } EXPORT -void nvnc_fb_pool_resize(struct nvnc_fb_pool* self, uint16_t width, +bool nvnc_fb_pool_resize(struct nvnc_fb_pool* self, uint16_t width, uint16_t height, uint32_t fourcc_format) { if (width == self->width && height == self->height && fourcc_format == self->fourcc_format) - return; + return false; nvnc_fb_pool__destroy_fbs(self); self->width = width; self->height = height; self->fourcc_format = fourcc_format; + + return true; } EXPORT