summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <ts.santos@sisa.samsung.com>2014-06-10 00:05:00 (GMT)
committerThiago Santos <ts.santos@sisa.samsung.com>2014-06-10 02:38:39 (GMT)
commit320293836958af73cbfae53741b428930c2fe31d (patch)
treebe73d33b68724e29abd3ddd0462ae79eec2bcbd0
parentfb3a9d1bc5f4f40957a58d7cad7ca77242e2a73f (diff)
downloadgst-plugins-base-320293836958af73cbfae53741b428930c2fe31d.tar.gz
gst-plugins-base-320293836958af73cbfae53741b428930c2fe31d.tar.xz
videoscale: vs_image: strides are a gsize
The strides that are set from the GstVideoInfo structs are a gsize. Using an int can cause overflows when dealing with large enough images https://bugzilla.gnome.org/show_bug.cgi?id=731195
-rw-r--r--gst/videoscale/vs_fill_borders.c18
-rw-r--r--gst/videoscale/vs_image.h2
2 files changed, 10 insertions, 10 deletions
diff --git a/gst/videoscale/vs_fill_borders.c b/gst/videoscale/vs_fill_borders.c
index 2a12d23..37ae78b 100644
--- a/gst/videoscale/vs_fill_borders.c
+++ b/gst/videoscale/vs_fill_borders.c
@@ -51,7 +51,7 @@ vs_fill_borders_RGBA (const VSImage * dest, const uint8_t * val)
int width = dest->width;
int height = dest->height;
int real_width = dest->real_width;
- int stride = dest->stride;
+ gsize stride = dest->stride;
int tmp, tmp2;
uint8_t *data;
uint32_t v = READ_UINT32 (val);
@@ -103,7 +103,7 @@ vs_fill_borders_RGB (const VSImage * dest, const uint8_t * val)
int width = dest->width;
int height = dest->height;
int real_width = dest->real_width;
- int stride = dest->stride;
+ gsize stride = dest->stride;
int tmp, tmp2;
uint8_t *data;
@@ -140,7 +140,7 @@ vs_fill_borders_YUYV (const VSImage * dest, const uint8_t * val)
int width = dest->width;
int height = dest->height;
int real_width = dest->real_width;
- int stride = dest->stride;
+ gsize stride = dest->stride;
int tmp, tmp2;
uint8_t *data;
@@ -189,7 +189,7 @@ vs_fill_borders_UYVY (const VSImage * dest, const uint8_t * val)
int width = dest->width;
int height = dest->height;
int real_width = dest->real_width;
- int stride = dest->stride;
+ gsize stride = dest->stride;
int tmp, tmp2;
uint8_t *data;
@@ -238,7 +238,7 @@ vs_fill_borders_Y (const VSImage * dest, const uint8_t * val)
int width = dest->width;
int height = dest->height;
int real_width = dest->real_width;
- int stride = dest->stride;
+ gsize stride = dest->stride;
int tmp, tmp2;
uint8_t *data;
@@ -275,7 +275,7 @@ vs_fill_borders_Y16 (const VSImage * dest, const uint16_t val)
int width = dest->width;
int height = dest->height;
int real_width = dest->real_width;
- int stride = dest->stride;
+ gsize stride = dest->stride;
int tmp, tmp2;
uint8_t *data;
@@ -312,7 +312,7 @@ vs_fill_borders_RGB565 (const VSImage * dest, const uint8_t * val)
int width = dest->width;
int height = dest->height;
int real_width = dest->real_width;
- int stride = dest->stride;
+ gsize stride = dest->stride;
int tmp, tmp2;
uint8_t *data;
uint16_t v = READ_UINT16 (val);
@@ -350,7 +350,7 @@ vs_fill_borders_RGB555 (const VSImage * dest, const uint8_t * val)
int width = dest->width;
int height = dest->height;
int real_width = dest->real_width;
- int stride = dest->stride;
+ gsize stride = dest->stride;
int tmp, tmp2;
uint8_t *data;
uint16_t v = READ_UINT16 (val);
@@ -388,7 +388,7 @@ vs_fill_borders_AYUV64 (const VSImage * dest, const uint8_t * val)
int width = dest->width;
int height = dest->height;
int real_width = dest->real_width;
- int stride = dest->stride;
+ gsize stride = dest->stride;
int tmp, tmp2;
uint8_t *data;
uint64_t v;
diff --git a/gst/videoscale/vs_image.h b/gst/videoscale/vs_image.h
index a59c6db..d0a30ec 100644
--- a/gst/videoscale/vs_image.h
+++ b/gst/videoscale/vs_image.h
@@ -42,7 +42,7 @@ struct _VSImage {
uint8_t *pixels;
int width;
int height;
- int stride;
+ gsize stride;
};
G_GNUC_INTERNAL void vs_image_scale_nearest_RGBA (const VSImage * dest,