summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2014-12-16 12:57:55 +0100
committerWim Taymans <wtaymans@redhat.com>2014-12-16 12:57:55 +0100
commit662a674f8a33547cd90dd79aa1557385567930f7 (patch)
tree727a046075a7913f8f96a2fc500f7c533e4cb8d8 /sys
parent8baf1ec50076bd4ea13477875069eb48d7f2a337 (diff)
downloadgst-plugins-base-662a674f8a33547cd90dd79aa1557385567930f7.tar.gz
gst-plugins-base-662a674f8a33547cd90dd79aa1557385567930f7.tar.xz
ximagesink: clear src and dest rectangles
Now that the center function also takes into account the x and y coordinates of the dest rectangle, better clear all the fields before using them.
Diffstat (limited to 'sys')
-rw-r--r--sys/ximage/ximagesink.c4
-rw-r--r--sys/xvimage/xvimagesink.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index ff6a9d60b..2a1f76b3a 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -230,7 +230,9 @@ gst_ximagesink_ximage_put (GstXImageSink * ximagesink, GstBuffer * ximage)
{
GstXImageMemory *mem;
GstVideoCropMeta *crop;
- GstVideoRectangle src, dst, result;
+ GstVideoRectangle src = { 0, };
+ GstVideoRectangle dst = { 0, };
+ GstVideoRectangle result;
gboolean draw_border = FALSE;
/* We take the flow_lock. If expose is in there we don't want to run
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index 6bd5b3e25..a0d62a06d 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -229,7 +229,8 @@ gst_xvimagesink_xvimage_put (GstXvImageSink * xvimagesink, GstBuffer * xvimage)
GstVideoCropMeta *crop;
GstVideoRectangle result;
gboolean draw_border = FALSE;
- GstVideoRectangle src, dst;
+ GstVideoRectangle src = { 0, };
+ GstVideoRectangle dst = { 0, };
GstVideoRectangle mem_crop;
GstXWindow *xwindow;
@@ -1129,7 +1130,9 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation,
if ((peer = gst_pad_get_peer (GST_VIDEO_SINK_PAD (xvimagesink)))) {
GstEvent *event;
- GstVideoRectangle src, dst, result;
+ GstVideoRectangle src = { 0, };
+ GstVideoRectangle dst = { 0, };
+ GstVideoRectangle result;
gdouble x, y, xscale = 1.0, yscale = 1.0;
GstXWindow *xwindow;