mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 17:09:48 +00:00
rectangle: clear rectangle struct before use
This commit is contained in:
parent
79b56ebcc9
commit
87f5574e39
6 changed files with 30 additions and 18 deletions
|
@ -1744,7 +1744,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;
|
||||
|
@ -1975,7 +1977,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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -237,7 +237,8 @@ gst_wl_window_is_toplevel (GstWlWindow * window)
|
|||
static void
|
||||
gst_wl_window_resize_video_surface (GstWlWindow * window, gboolean commit)
|
||||
{
|
||||
GstVideoRectangle src, res;
|
||||
GstVideoRectangle src = { 0, };
|
||||
GstVideoRectangle res;
|
||||
|
||||
/* center the video_subsurface inside area_subsurface */
|
||||
src.w = window->video_width;
|
||||
|
@ -256,7 +257,8 @@ gst_wl_window_resize_video_surface (GstWlWindow * window, gboolean commit)
|
|||
struct wl_region *region;
|
||||
|
||||
region = wl_compositor_create_region (window->display->compositor);
|
||||
wl_region_add(region, 0, 0, window->render_rectangle.w, window->render_rectangle.h);
|
||||
wl_region_add (region, 0, 0, window->render_rectangle.w,
|
||||
window->render_rectangle.h);
|
||||
wl_surface_set_input_region (window->area_surface, region);
|
||||
wl_region_destroy (region);
|
||||
}
|
||||
|
|
|
@ -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,7 +210,9 @@ 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;
|
||||
GstPad *pad = NULL;
|
||||
|
@ -1578,8 +1581,9 @@ WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue