summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2013-04-08 14:59:54 +0000
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-05-24 09:39:10 +0200
commita666843005be47c2951b54ea5b7ba0b8f595a956 (patch)
tree016a060704e03861cb6d91a58f423c881dd45467 /sys
parent578b58e490d404ee6165003401b09aaa1cb339dd (diff)
downloadgstreamer-plugins-bad-a666843005be47c2951b54ea5b7ba0b8f595a956.tar.gz
directdrawsink: update window width/height when it's not done in WndProc
Diffstat (limited to 'sys')
-rw-r--r--sys/directdraw/gstdirectdrawsink.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c
index cc3d27ce0..811d812db 100644
--- a/sys/directdraw/gstdirectdrawsink.c
+++ b/sys/directdraw/gstdirectdrawsink.c
@@ -210,11 +210,15 @@ gst_directdraw_sink_navigation_send_event (GstNavigation * navigation,
GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (navigation);
GstEvent *event;
GstVideoRectangle src, dst, result;
+ RECT rect;
gdouble x, y, old_x, old_y, xscale = 1.0, yscale=1.0;
GstPad *pad = NULL;
src.w = GST_VIDEO_SINK_WIDTH (ddrawsink);
src.h = GST_VIDEO_SINK_HEIGHT (ddrawsink);
+ GetClientRect ((HWND) ddrawsink->video_window, &rect);
+ ddrawsink->out_width = rect.right - rect.left;
+ ddrawsink->out_height = rect.bottom - rect.top;
dst.w = ddrawsink->out_width;
dst.h = ddrawsink->out_height;