diff options
author | Wim Taymans <wtaymans@redhat.com> | 2014-12-16 13:35:14 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-12-16 15:07:03 +0100 |
commit | a2d8fa7db9b70e5ea8a0d3ad415d26ec6e0b2185 (patch) | |
tree | 44e5f221ad8caa35b8a38c94d7c2bbbf16b910f4 | |
parent | dd2aa4c08118f6ebce91eefc847de2b089e9dc89 (diff) | |
download | gstreamer-plugins-bad-a2d8fa7db9b70e5ea8a0d3ad415d26ec6e0b2185.tar.gz |
rectangle: clear rectangle struct before use
-rw-r--r-- | ext/directfb/dfbvideosink.c | 8 | ||||
-rw-r--r-- | ext/sdl/sdlvideosink.c | 4 | ||||
-rw-r--r-- | ext/wayland/wlwindow.c | 3 | ||||
-rw-r--r-- | sys/directdraw/gstdirectdrawsink.c | 20 | ||||
-rw-r--r-- | sys/pvr2d/gstpvrvideosink.c | 3 | ||||
-rw-r--r-- | sys/vdpau/gstvdpvideopostprocess.c | 7 |
6 files changed, 28 insertions, 17 deletions
diff --git a/ext/directfb/dfbvideosink.c b/ext/directfb/dfbvideosink.c index e2f8e8d61..83ab7f931 100644 --- a/ext/directfb/dfbvideosink.c +++ b/ext/directfb/dfbvideosink.c @@ -1742,7 +1742,9 @@ gst_dfbvideosink_show_frame (GstBaseSink * bsink, GstBuffer * buf) { GstDfbVideoSink *dfbvideosink = NULL; DFBResult res; - GstVideoRectangle dst, src, result; + GstVideoRectangle dst = { 0, }; + GstVideoRectangle src = { 0, }; + GstVideoRectangle result; GstFlowReturn ret = GST_FLOW_OK; gboolean mem_cpy = TRUE; GstMetaDfbSurface *meta; @@ -1973,7 +1975,9 @@ gst_dfbvideosink_navigation_send_event (GstNavigation * navigation, { GstDfbVideoSink *dfbvideosink = GST_DFBVIDEOSINK (navigation); GstEvent *event; - GstVideoRectangle src, dst, result; + GstVideoRectangle dst = { 0, }; + GstVideoRectangle src = { 0, }; + GstVideoRectangle result; double x, y, old_x, old_y; GstPad *pad = NULL; diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c index 5c1217f87..7f05dcad8 100644 --- a/ext/sdl/sdlvideosink.c +++ b/ext/sdl/sdlvideosink.c @@ -944,7 +944,9 @@ gst_sdlvideosink_navigation_send_event (GstNavigation * navigation, { GstSDLVideoSink *sdlvideosink = GST_SDLVIDEOSINK (navigation); GstEvent *event; - GstVideoRectangle src, dst, result; + GstVideoRectangle dst = { 0, }; + GstVideoRectangle src = { 0, }; + GstVideoRectangle result; double x, y, old_x, old_y; GstPad *pad = NULL; diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c index f58df0965..ea6c681a2 100644 --- a/ext/wayland/wlwindow.c +++ b/ext/wayland/wlwindow.c @@ -187,7 +187,8 @@ gst_wl_window_is_toplevel (GstWlWindow * window) static void gst_wl_window_resize_internal (GstWlWindow * window, gboolean commit) { - GstVideoRectangle src, res; + GstVideoRectangle src = { 0, }; + GstVideoRectangle res; src.w = window->video_width; src.h = window->video_height; diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 811d812db..99140f212 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -92,7 +92,8 @@ static gboolean gst_ddrawvideosink_get_format_from_caps (GstDirectDrawSink * static void gst_directdraw_sink_center_rect (GstDirectDrawSink * ddrawsink, RECT src, RECT dst, RECT * result); static const char *DDErrorString (HRESULT hr); -static long FAR PASCAL WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); +static long FAR PASCAL WndProc (HWND hWnd, UINT message, WPARAM wParam, + LPARAM lParam); /* surfaces management functions */ static void gst_directdraw_sink_surface_destroy (GstDirectDrawSink * ddrawsink, @@ -209,9 +210,11 @@ gst_directdraw_sink_navigation_send_event (GstNavigation * navigation, { GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (navigation); GstEvent *event; - GstVideoRectangle src, dst, result; + GstVideoRectangle src = { 0, }; + GstVideoRectangle dst = { 0, }; + GstVideoRectangle result; RECT rect; - gdouble x, y, old_x, old_y, xscale = 1.0, yscale=1.0; + gdouble x, y, old_x, old_y, xscale = 1.0, yscale = 1.0; GstPad *pad = NULL; src.w = GST_VIDEO_SINK_WIDTH (ddrawsink); @@ -519,7 +522,7 @@ gst_directdraw_sink_init (GstDirectDrawSink * ddrawsink, ddrawsink->video_window = NULL; ddrawsink->our_video_window = TRUE; ddrawsink->previous_wndproc = NULL; - ddrawsink->previous_user_data = (LONG_PTR)NULL; + ddrawsink->previous_user_data = (LONG_PTR) NULL; ddrawsink->last_buffer = NULL; ddrawsink->caps = NULL; ddrawsink->window_thread = NULL; @@ -1575,14 +1578,15 @@ WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) /* Temporarily restore the previous user_data */ if (ddrawsink->previous_user_data) - SetWindowLongPtr ( hWnd, GWLP_USERDATA, ddrawsink->previous_user_data ); + SetWindowLongPtr (hWnd, GWLP_USERDATA, ddrawsink->previous_user_data); /* Call previous WndProc */ - ret = CallWindowProc ( - ddrawsink->previous_wndproc, hWnd, message, wParam, lParam); + ret = + CallWindowProc (ddrawsink->previous_wndproc, hWnd, message, wParam, + lParam); /* Point the user_data back to our ddraw_sink */ - SetWindowLongPtr ( hWnd, GWLP_USERDATA, (LONG_PTR)ddrawsink ); + SetWindowLongPtr (hWnd, GWLP_USERDATA, (LONG_PTR) ddrawsink); } else { /* if there was no previous custom WndProc, call Window's default one */ ret = DefWindowProc (hWnd, message, wParam, lParam); diff --git a/sys/pvr2d/gstpvrvideosink.c b/sys/pvr2d/gstpvrvideosink.c index 7dc30c1b0..6d117fb90 100644 --- a/sys/pvr2d/gstpvrvideosink.c +++ b/sys/pvr2d/gstpvrvideosink.c @@ -564,7 +564,8 @@ gst_pvrvideosink_blit (GstPVRVideoSink * pvrvideosink, GstBuffer * buffer) } if (pvrvideosink->keep_aspect) { - GstVideoRectangle src, dst; + GstVideoRectangle src = { 0, }; + GstVideoRectangle dst = { 0, }; src.w = GST_VIDEO_SINK_WIDTH (pvrvideosink); src.h = GST_VIDEO_SINK_HEIGHT (pvrvideosink); diff --git a/sys/vdpau/gstvdpvideopostprocess.c b/sys/vdpau/gstvdpvideopostprocess.c index 483e74a54..b7b68798c 100644 --- a/sys/vdpau/gstvdpvideopostprocess.c +++ b/sys/vdpau/gstvdpvideopostprocess.c @@ -674,9 +674,8 @@ gst_vdp_vpp_drain (GstVdpVideoPostProcess * vpp) GstVdpOutputBuffer *outbuf; GstStructure *structure; - GstVideoRectangle src_r = { 0, } - , dest_r = { - 0,}; + GstVideoRectangle src_r = { 0, }; + GstVideoRectangle dest_r = { 0, }; VdpRect rect; GstVdpDevice *device; @@ -705,7 +704,7 @@ gst_vdp_vpp_drain (GstVdpVideoPostProcess * vpp) goto invalid_caps; if (vpp->force_aspect_ratio) { - GstVideoRectangle res_r; + GstVideoRectangle res_r = { 0, }; gst_video_sink_center_rect (src_r, dest_r, &res_r, TRUE); rect.x0 = res_r.x; |